functionally 0.0.1-dev.1 copy "functionally: ^0.0.1-dev.1" to clipboard
functionally: ^0.0.1-dev.1 copied to clipboard

A library for functional programming goodies

This library introduces numerous pure functional types, much like fp-ts

Features #

Here are some examples of types which you may find

  • Either
  • IO
  • Task
  • Reader
  • ReaderStream
  • ...

Keep in mind that I will be adding more types as I continue development. If you need one in particular, just open an issue.

Getting started #

The library depends on rxdart.

Usage #

Here's an example:

import 'package:functionally/extensions/reader_stream.dart';
import 'package:functionally/reader_stream.dart' as RS;

void main() {
  final RS.ReaderStream<String, String> readerStream =
      RS.ask<String>().map((hello) => '$hello World');

  readerStream('Hello').listen(print);
}

This sample will probably not help you much if you don't have experience with pure functional paradigms. If you have experience with typescript and want to learn more, i suggest searching online guides about fp-ts. Otherwise consider learning Haskell :P.

You may also find more examples in Fridgy, an app written with this library.

0
likes
0
pub points
0%
popularity

Publisher

verified publishergaudo.net

A library for functional programming goodies

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

rxdart

More

Packages that depend on functionally