4 ms·
What you're saying, then, is that it's terribly confusing [for you] when someone uses a list comprehension fully? Presumably, these also are not completely cle
by 59nadir 11y ago
What you're saying, then, is that it's terribly confusing [for you] when someone uses a list comprehension fully?
Presumably, these also are not completely clear to you:
> [x * 2 | x <- [1, 2, 3, 4], even x]
[4,8]
> [x * 2 | x <- filter even [1, 2, 3, 4]]
[4,8]
What, exactly, is not clear here? This is the essence of composition; to use clearly defined things together. I can appreciate a good pipeline as much as the next guy, but to say that this is somehow more complicated and hard to read is to overstretch a little bit.
To say that a pretty uncluttered list comprehension is some challenge to read is just hyperbolic. These pipelines, even with newlines, can get pretty long and terrible too.