Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Last active August 29, 2015 14:06
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 MichaelDrogalis/51fe0e76f61e6cebb987 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/51fe0e76f61e6cebb987 to your computer and use it in GitHub Desktop.
(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