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;
});
1.03k
likes
0
points
223k
downloads

Publisher

verified publishersandromaglione.com

Weekly Downloads

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