3 ms·
Nice! Looks like most modern list-comprehension syntaxes. > iteration and value accumulation are orthogonal problems which should be solved by orthogonal const
by brandonbloom 2y ago
Nice! Looks like most modern list-comprehension syntaxes.
> iteration and value accumulation are orthogonal problems which should be solved by orthogonal constructs
This is also covered to an extent by "Why Functional Programming Matters" in the discussion of laziness: https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.p...
For a direct comparison of combining this syntax with "accumulation" into a lazy sequence, see Clojure's `for` macro:
https://clojuredocs.org/clojure.core/for https://clojuredocs.org/clojure.core/for