Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;; "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