Created
December 21, 2015 21:29
-
-
Save domgetter/e6bb8829a644d9da0e8d to your computer and use it in GitHub Desktop.
This file contains 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
(defn notify [n] (println (str "Working on: " n)) n) | |
(reduce + 0 (map notify (range 4))) | |
;=> Working on: 0 | |
;=> Working on: 1 | |
;=> Working on: 2 | |
;=> Working on: 3 | |
;=> 6 | |
(redcue ((map notify) +) 0 (range 4)) | |
;=> Working on: 0 | |
;=> Working on: 1 | |
;=> Working on: 2 | |
;=> Working on: 3 | |
;=> 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment