dfunc 0.6.0-nullsafety.2 copy "dfunc: ^0.6.0-nullsafety.2" to clipboard
dfunc: ^0.6.0-nullsafety.2 copied to clipboard

outdated

Functional batteries for Dart. Implementation of Either, Optional etc.

example/lib/main.dart

import 'package:dfunc/dfunc.dart';

void main() {
  final items = ['a', 'b', 'c'];
  print('mapped: ${mapIndexed((i, e) => '$e$i', items)}');

  // Either

  final either = Either<Exception, String>.right('test');
  either.isRight() == true;
  either.map((s) => s.toUpperCase()).fold(always(null), identity) == 'TEST';
}
15
likes
0
pub points
87%
popularity

Publisher

verified publisherookamikb.dev

Functional batteries for Dart. Implementation of Either, Optional etc.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on dfunc