functionally 0.0.1-dev.3 functionally: ^0.0.1-dev.3 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.
Usage #
Here's an example:
import 'package:functionally/oo/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.