Added new methods to Option
and Result
.
Option:
flatMap
- returns None or callsf
with the wrapped value and returnsSome(f(value))
;filter
- returns None if the option is None or predicate returns false, otherwise returns Some.
Result:
flatMap
- callsf
if the result isOk
, otherwise returns theErr
value of self;flatMapErr
- Callsf
if the result isErr
, otherwise returns theOk
value of self.
Full Changelog: v0.2.1...v0.3.0