File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252 " Recursively returns all files and directories below" )
5353
5454 (walk- files [this]
55- " Recursivelt returns all files underneath" )
55+ " Recursively returns all files underneath" )
5656
5757 (walk- dirs [this]
5858 " Recursivley returns all directories underneath" ))
Original file line number Diff line number Diff line change 195195(def into (fn ^ {:doc " Add the elements of `from` to the collection `to`."
196196 :signatures [[to from ]]
197197 :added " 0.1" }
198- into
199- [to from ]
200- (if (satisfies? IToTransient to)
201- (persistent! (reduce conj! (transient to) from ))
202- (reduce conj to from ))))
198+ ([to from ]
199+ (if (satisfies? IToTransient to)
200+ (persistent! (reduce conj! (transient to) from ))
201+ (reduce conj to from )))
202+ ([to xform from ]
203+ (if (satisfies? IToTransient to)
204+ (transduce xform conj! (transient to) from )
205+ (transduce xform conj to from )))))
203206
204207(def interpose
205208 (fn ^ {:doc " Returns a transducer that inserts `val` in between elements of a collection."
Original file line number Diff line number Diff line change 338338 [2 :a] [2 :b] [2 :c]
339339 [3 :a] [3 :b] [3 :c]]))
340340
341+ (t/ deftest test- into
342+ (t/ assert = [1 3 ] (into [] (comp (map inc) (filter odd?)) (range 3 )))
343+ (t/ assert = {:a 1 :b 2 } (into {} [[:a 1 ] [:b 2 ]])))
344+
341345(t/ deftest test- ex- msg
342346 (try
343347 (throw " This is an exception" )
You can’t perform that action at this time.
0 commit comments