Created
October 11, 2014 19:17
-
-
Save mihneadb/48d0751f62674928269d to your computer and use it in GitHub Desktop.
mapping transducer
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
(sequence (map inc) [1 2 3]) ; (2 3 4) | |
; ^^^^^^^^^ | |
; "mapping transducer" | |
(defn sequence | |
; [...] | |
([xform coll] | |
(clojure.lang.LazyTransformer/create xform coll)) | |
; [...] | |
) | |
; from the java source at https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LazyTransformer.java#L114 | |
; this.xform = (IFn) xform.invoke(stepfn); | |
; ^^^^^^^^^^^ | |
; transudcer getting stepfn as argument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment