Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created December 21, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domgetter/e6bb8829a644d9da0e8d to your computer and use it in GitHub Desktop.
Save domgetter/e6bb8829a644d9da0e8d to your computer and use it in GitHub Desktop.
(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