4 ms·
Comprehensions vs. map/filter/etc. is a style thing. If you think in terms of an expression language that composes functions, then map and filter are more natu
by MathMonkeyMan 4y ago
Comprehensions vs. map/filter/etc. is a style thing.
If you think in terms of an expression language that composes functions, then map and filter are more natural.
If you think in terms of a statement language with special syntax for computation expressions, then comprehensions are more natural.
Even in Racket (a scheme), idiomatic code seems to prefer the `for/thing` family of macros, which have a variety of flavors and keyword arguments to support map, filter, reduce, mapcar, etc.
Whatever floats your boat.