Skip to content

Commit 8309509

Browse files
committed
Add (forward) tee operator (|-)
1 parent d97c5eb commit 8309509

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FSharpPlus/Operators.fs

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ module Operators =
5555
/// <category index="0">Common Combinators</category>
5656
let inline (/>) x = flip x
5757

58+
/// <summary>
59+
/// Executes a side-effect function and returns the original input value. Same as 'tap' but with arguments flipped.
60+
/// </summary>
61+
/// <category index="0">Common Combinators</category>
62+
let inline (|-) source ([<InlineIfLambda>]f: 'T -> unit) = f source; source
63+
5864
/// <summary>
5965
/// Executes a side-effect function and returns the original input value.
6066
/// </summary>

0 commit comments

Comments
 (0)