dfp 0.2.0 dfp: ^0.2.0 copied to clipboard
A library for typed functional programming in Dart, inspired by Rust.
[0.0.1] - TODO: Add release date. #
- TODO: Describe initial release.
[0.2.0] - 29.05.2022 #
Added new type Result that represents either success (Ok) or failure (Err).
A number of new methods have been added for Result and Option:
ifSome
,ifNone
,ifSomeElse
,when
(Option) andifOk
,ifErr
,ifOkElse
,when
for getting internal value using callbacks;- static method
flatten
that converts fromOption<Option<T>>
toOption<T>
and respectivelyResult<Result<T, E>, E>
toResult<T, E>
; - static method
transpose
for both classes that transposes a Result of an Option into an Option of a Result (and vice versa); - added tests for all methods (code coverage is 100%).