Created
March 27, 2012 18:46
-
-
Save stefanalfbo/2219058 to your computer and use it in GitHub Desktop.
More simple pipeline operator examples in F#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pipeline in the opposite direction | |
> double <| 10;; | |
val it : int = 20 | |
> subtract 2 <| 4;; | |
val it : int = 2 | |
// Pipeline with a tuple | |
> (2, 4) ||> subtract;; | |
val it : int = 2 | |
> subtract <|| (2, 4);; | |
val it : int = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment