Clojurians
#cljs-dev
<
2017-12-17
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes19:12:28

I'm curious if there is any fundamental reason https://dev.clojure.org/jira/browse/CLJ-1603 couldn't be ported to ClojureScript. One motivation would be the ability to transduce over large generated collections without consuming memory (which otherwise occurs due to lack of locals clearing).

mfikes19:12:31

Alex's post related to that ticket is of interest http://insideclojure.org/2015/01/18/reducible-generators/

mfikes19:12:01

A concrete motivating example:

(transduce (comp (map inc) (filter odd?) (take 1e8)) + (range))
vs.
(transduce (comp (map inc) (filter odd?) (take 1e8)) + (iterate inc 0))
(The former uses little to no memory, the latter gigabytes.)