exalted.future
Advanced tools
Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "exalted.future", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Exalted monadic library & functional fun, fantasy-land compliant, mostly.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/pre63/exalted.future.git", |
# exalted.future | ||
**Experimental** | ||
## *Experimental* | ||
A javascript and typescript monadic library & functional fun. [fantasy-land](https://github.com/fantasyland/fantasy-land) compliant, mostly. | ||
The style of monad object is inspired by [DrBoolean](https://github.com/DrBoolean) course on [egghead.io](https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript). | ||
The choice for `cata`, `encase`, `head`, `tail`, `last` is inspired by rametta's take on monads in [pratica](https://github.com/rametta/pratica). | ||
This is, in many ways, an evolution of [oncha](https://www.npmjs.com/package/oncha) which I wrote with other people many years ago and is no longer maintained. | ||
# Install | ||
@@ -21,10 +27,9 @@ ``` bash | ||
* There is a divergence from fantasy land where `reduce` is named `cata` and is more similar to [daggy](https://github.com/fantasyland/daggy) than the typical reduce. | ||
* `fold` always folds on identity `a => a`. | ||
* There is a divergence from fantasy-land where `reduce` is named `cata` and loosely based on [daggy](https://github.com/fantasyland/daggy)'s union types. | ||
* `fold` always folds on identity `a => a`, except when it does not like with the `Future`. | ||
* `Maybe.map` will return Nothing if the callback function returns null. In other words `Just(null)` is impossible, unless you call the 'static' constructor like this `Just.of(null)`. See [this pr](https://github.com/rametta/pratica/issues/15) for some explanation. | ||
* Left is not 100% applicative. | ||
* `cata` and some new utilities such as `encase`, `head`, `tail`, `get` are inspired by rametta's take on monads in [pratica](https://github.com/rametta/pratica). | ||
* This is, in many, a revision or evolution of [oncha](https://www.npmjs.com/package/oncha) which I wrote with other people many years ago and is no longer maintained. | ||
## All | ||
@@ -350,4 +355,4 @@ These functions are available on all types. | ||
# Higher Order | ||
## Compose | ||
# Higher Order Utilities | ||
## compose | ||
Compose takes n functions as arguments and return a function. | ||
@@ -367,3 +372,3 @@ | ||
## Map | ||
## map | ||
Map as partial application and first class with arity support. | ||
@@ -376,3 +381,3 @@ | ||
## Head, Tail, Last | ||
## head, tail, last | ||
Returns a Maybe. | ||
@@ -400,3 +405,3 @@ ``` javascript | ||
## Encase, EncaseEither | ||
## encase, encaseEither | ||
Returns `Left | Right`. | ||
@@ -403,0 +408,0 @@ ``` javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32945
426