Skip to content

Instantly share code, notes, and snippets.

@gbluma
Created April 17, 2012 18:00
Show Gist options
  • Save gbluma/2407857 to your computer and use it in GitHub Desktop.
Save gbluma/2407857 to your computer and use it in GitHub Desktop.
-- F#-style pipe for nicer readability of programs.
-- Instead of writing function calls in a nested form, you can accomplish the same thing
-- and read it in a straightforward order.
-- define the pipe
(|>) x y = y x
-- example usage
main = do
[0..9]
|> filter (>2)
|> sum
|> print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment