Scan function

2009-04-08 Thread jim
I implemented a scan function, that is a function like reduce but that returns a list of the intermediate results not just the last one. (defn scan ([f coll] (scan f (first coll) (rest coll))) ([f val coll] (when (not (empty? coll

Re: Scan function

2009-04-08 Thread Laurent PETIT
Hi, I think this is similar to clojure.contrib.seq-utils/reductions ? 2009/4/8 jim jim.d...@gmail.com I implemented a scan function, that is a function like reduce but that returns a list of the intermediate results not just the last one. (defn scan ([f coll] (scan f