clojure.core/reductions¶
Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.
Examples¶
Note by betegelse¶
I think the description above would be clearer if it stated that the result of reductions is equivalent to the sequence of results of applying reduce to (take n coll), with n starting with 1, that is, equivalent to
Note by jayzawrotny¶
In other libraries and languages this function may be referred to as "scan".
See also¶
- clojure.core/reduce (22)
- clojure.core/reduced (3)
Content from the matching ClojureDocs page, with authors credited on each contribution.