Skip to content

Instantly share code, notes, and snippets.

@ympbyc
Last active December 28, 2015 15:29
Show Gist options
  • Save ympbyc/7521988 to your computer and use it in GitHub Desktop.
Save ympbyc/7521988 to your computer and use it in GitHub Desktop.
Pipeline operator as a function
(= -> x f g (g (f x)))
(-> 0
(+ 2)
-> (* 3)
-> num->str
-> (flip ++ " = six")
(print 0))
(-> integers
(flip map (* 2))
-> (flip take 7)
-> (^ xs (fold xs + 0))
-> (+ 8)
id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment