Created
November 16, 2016 00:04
-
-
Save d6y/b56baeb38eeea2dc11d426b13a273cc9 to your computer and use it in GitHub Desktop.
Haskell pipe
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
Prelude> let (|>) = flip (.) | |
Prelude> let hh = (*2) |> (+1) |> (+0.1) | |
Prelude> :t hh | |
hh :: Fractional c => c -> c | |
Prelude> hh 50 | |
101.1 | |
Prelude> :q | |
Leaving GHCi. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment