3.5.0
This release brings two new methods; one for convertign Option
s to Either
s and another to bring the FirstOrNone
-style operations to Dictionary
.
Using someOption.ToEither(fallback)
, you can turn an Option<TSome>
into an Either<TSome, TFallback>
. As expected, Some
will be the A
while the provided fallback will be used as B
if the option is None
.
Using dictionary.GetValueOrNone(key)
, you can extract a value from a dictionary - or not, if the key is not present - similar to how FirstOrNone
and others work.