| ▲ | harryposner 3 hours ago | |
Clojure has two options: The version with a threading macro, will create a lazy-sequence for each step in the pipeline. It will not instantiate the entire list, so it's O(1) memory overhead in terms of peak memory, but it churns O(N) extra garbage.
And the version with transducers, which will not create any intermediate sequences:
It looks like there's a Common Lisp transducers library, but I have no idea how widely it's used. | ||