fpdart 2.0.0-dev.2 copy "fpdart: ^2.0.0-dev.2" to clipboard
fpdart: ^2.0.0-dev.2 copied to clipboard

Functional Effect System in Dart and Flutter. Build composable, type safe, maintainable and testable apps with an extensive API fully tested and documented.

example/main.dart

import 'package:fpdart/fpdart.dart';

typedef Env = ({String url, int seed});
typedef Error = String;
typedef Success = int;

final either = Right<Error, Success>(10);
final option = Some(10);

final effect = Effect<Env, Error, Success>.gen(($) async {
  final eitherValue = $.sync(either);
  final optionValue = $.sync(option);
  final deferred = $.sync(Deferred.make<Error, Success>().withEnv());
  final value = await $.async(deferred.wait());
  return eitherValue + optionValue;
});
787
likes
0
pub points
98%
popularity

Publisher

verified publishersandromaglione.com

Functional Effect System in Dart and Flutter. Build composable, type safe, maintainable and testable apps with an extensive API fully tested and documented.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on fpdart