Full source: https://gist.github.com/mrange/aa9e0898492b6d384dd839bc4a2f96a1
Option<_>
is great for ROP (Railway Oriented Programming) but we get no info on what went wrong (the failure value is None
which carries no info).
With the introduction F# 4.1 we got Result<_, _>
a "smarter" Option<_>
as it allows us to pass a failure value.
However, when one inspects the signature of Result.bind
one sees a potential issue for ROP: