4 ms·
> Also Haskell gets the order of ‘<-‘ clauses wrong, so probably mine is a minority opinion. That's probably so it's more in-line with do-notation: [x | xs
by jolmg 5y ago
> Also Haskell gets the order of ‘<-‘ clauses wrong, so probably mine is a minority opinion.
That's probably so it's more in-line with do-notation:
[x | xs <- xss, x <- xs]
is the same as:
do { xs <- xss; x <- xs; return x }
Maybe writing statements backwards was deemed more confusing.
Personally, I don't really use list comprehension syntax, but maybe I would if they were backwards like you describe. It would make more sense with the position of the return value being to the left.