fpdart 2.0.0-dev.3 copy "fpdart: ^2.0.0-dev.3" to clipboard
fpdart: ^2.0.0-dev.3 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.12k
likes
140
points
191k
downloads
screenshot

Documentation

Documentation
API reference

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

License

MIT (license)

Dependencies

meta

More

Packages that depend on fpdart