Last active
August 29, 2015 14:05
-
-
Save ifesdjeen/65fd22e9b0e3b9092552 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; "Normal" operation order | |
(->> [1 2 3] | |
(map inc) | |
(map #(* 2 %) | |
(reduce +)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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