3 ms·
Aaaand this works on arrays, but would you know how to make it work for files? You would need to do something like how the essay wrapped the `rdr` into a sequen
by onetom 6y ago
Aaaand this works on arrays, but would you know how to make it work for files?
You would need to do something like how the essay wrapped the `rdr` into a sequence, but it would still require (probably) the whole data to be present in the memory at once...
I think you would need something like this:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
but I found it quite mind-bending when I tried it once.
Clojure's way of building something like this out of a `lazy-seq` call feels simpler to me...