dfp 0.2.0 copy "dfp: ^0.2.0" to clipboard
dfp: ^0.2.0 copied to clipboard

outdated

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) and ifOk, ifErr, ifOkElse, when for getting internal value using callbacks;
  • static method flatten that converts from Option<Option<T>> to Option<T> and respectively Result<Result<T, E>, E> to Result<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%).
0
likes
0
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

A library for typed functional programming in Dart, inspired by Rust.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dfp