fsprojects / Chessie

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

Error list for combined validation failures #51

Open xajler opened 7 years ago

xajler commented 7 years ago

I'm interested how to get an error list of combined validation failures. In ROP example by Scott he is using plus or &&&.

I assume in Chessie this is apply or <*>, but I'm not sure how to use it. I didn't see any example of using it, and no test on this function. Is there a possibility for somebody to show example of using (as in your docs combinedValidation) but result to be, all errors that happened in all validation combined together, because with bind >> only first error is returned?

Thanks.

mrinaldi commented 7 years ago

There are two examples in the docs on how to combine functions in applicative style: http://fsprojects.github.io/Chessie/a-tale-of-3-nightclubs-fsharp.html#Part-Two-Club-Tropicana http://fsprojects.github.io/Chessie/a-tale-of-3-nightclubs-fsharp.html#Part-Three-Gay-bar