+1 for embracing fully F#-like computation expressions
But the problem with the current for
comprehension and redundant map
could be solved by a relatively small change:
What we need is a for
comprehension without the yield
part. So instead of
for {
a <- f1
b <- f2(a)
c <- f3(a, b)
} yield c
it would be just
for {
a <- f1
b <- f2(a)
f3(a, b)
}
That’s how Haskell does it, btw. Allowing that seem easily doable, doesn’t it? Or are there problems with it?