clojure.core/doall¶
When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time.
Examples¶
Note by johnnyluu¶
Shouldn't we use seq instead of coll in the function signature since we should really pass a sequence?
Note by zephjc¶
'seq' is a function; using it in the function args as a value would shadow the function (and thereby making the function seq unusable in that scope)
See also¶
- clojure.core/dorun (1)
- clojure.core/doseq (9)
- clojure.core/run! (1)
Content from the matching ClojureDocs page, with authors credited on each contribution.