What is F#+'s equivalent of Scott Wlaschin's plus
function? (i.e., concatenating Error
values during a validation pipeline for example)
#576
-
The A functional approach to error handling (Railway oriented programming) article is a great intro to monadic error handling, and when I learned about the F#+ library, I tried to find the equivalent functions in it. The problem is that the article is informal on purpose, and it is hard to connect the dots with almost zero background knowledge (e.g., just learned that The
I went through the operators in the Thank you for this library and also for the help in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Main starting point is the abstractions page. The abstraction you are looking for is called an applicative. An example of applicative error handling is done here as well as the documentation on the applicative page. Note the usage of |
Beta Was this translation helpful? Give feedback.
-
Thank you!
I remember looking at them, but looks like I couldn't put 2 and 2 together. Thanks for the hint! |
Beta Was this translation helpful? Give feedback.
Main starting point is the abstractions page. The abstraction you are looking for is called an applicative. An example of applicative error handling is done here as well as the documentation on the applicative page.
Note the usage of
<!>
and<*>
that you can find referenced in the above mentioned Operators module and in the documentation for applicatives.