Skip to content

Instantly share code, notes, and snippets.

@ifesdjeen
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ifesdjeen/65fd22e9b0e3b9092552 to your computer and use it in GitHub Desktop.
Save ifesdjeen/65fd22e9b0e3b9092552 to your computer and use it in GitHub Desktop.
;; "Normal" operation order
(->> [1 2 3]
(map inc)
(map #(* 2 %)
(reduce +))
t :: [Integer] -> Integer
-- "Reverse" operation order
t x = foldr1 (+) $ map (*2) $ map (+1) x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment