Typed functional piping in Dart. Please message or contact on github if you have any suggestions. This may very well not be production ready...it might even be a bad idea! It is really just a play thing but my intention was to model the piping functionality in Haskell.
C(initial value).x(first function).x(second function).execute(); var result = C(6) .x0(addOne) .x2(addTwoNumbers, 4, 5) .x1(addNumber, 3) .x0(addOne) .x1(addNumber, 4) .$(); //we need this last function to exectue the composition
This is just a playful thing, nothing serious!
//see the test folder for examples of how to use
Add this to your package's pubspec.yaml file:
dependencies: fn_compose: ^0.1.0
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:fn_compose/compose.dart'; import 'package:fn_compose/composefn.dart';
|0.1.0||Jan 23, 2019|
|0.0.3||Dec 5, 2018|
|0.0.2||Dec 5, 2018|
|0.0.1||Dec 5, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in libraries.
dartfmt to format
dartfmt to format
The description is too long. (-10 points)
Search engines display only the first part of the description. Try to keep the value of the
description field in your package's
pubspec.yaml file between 60 and 180 characters.
|Dart SDK||>=2.1.0 <3.0.0|