fsprojects / Chessie

Railway-oriented programming for .NET
http://fsprojects.github.io/Chessie/
The Unlicense
188 stars 43 forks source link

SelectMany implementation changed, fixes #26 #27

Closed battermann closed 8 years ago

battermann commented 8 years ago

This fixes #26.

The C# LINQ query syntax from a in ... select ... should do a bind operation. This was currently not working correctly as messages where being repeated.

E.g.

from a in Result<string, string>.FailWith("fail1")
from b in Result<string, string>.FailWith("fail2")
from c in Result<string, string>.FailWith("fail3")
select new[] { a, b, c }

produces now a Failure with exactly 1 message: < "fail1" > instead of 4 duplicated messages.

forki commented 8 years ago

thx