Last active
August 29, 2015 14:06
-
-
Save MichaelDrogalis/51fe0e76f61e6cebb987 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
(def xform | |
(comp (map inc) | |
(filter even?) | |
(dedupe))) | |
(def data (vec (interleave (range 18) (range 18)))) | |
;; lazily transform the data | |
(sequence xform data) | |
;;; vs ;;;; | |
(defn f [] | |
(fn [coll] | |
(->> coll | |
(map inc) | |
(filter even?) | |
(dedupe)))) | |
((f) data) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment