Skip to content

Instantly share code, notes, and snippets.

@fogus
Forked from puffnfresh/Pipeline.hs
Created May 9, 2013 18:19
Show Gist options
  • Save fogus/5549406 to your computer and use it in GitHub Desktop.
Save fogus/5549406 to your computer and use it in GitHub Desktop.
import Data.Monoid
pipeline :: [a -> a] -> a -> a
pipeline = appEndo . getDual . mconcat . fmap (Dual . Endo)
main = print $ pipeline [(+1), (*10)] 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment