Skip to content

3.5.0

Compare
Choose a tag to compare
@phkiener phkiener released this 11 Aug 15:02
· 11 commits to master since this release
a874f38

This release brings two new methods; one for convertign Options to Eithers 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.