Awesome
<a id="infestines"></a> ≡ ▶ Infestines ·
This is a minimalistic library of basic utilities, such as currying, for writing more interesting high performance FP libraries. This library is not intended to be used for application programming. Primitives that are too specialized to be used as a basis for nearly optimal implementations of higher level operations are not provided.
<a id="contents"></a> ≡ ▶ Contents
- Reference
<a id="reference"></a> ≡ ▶ Reference
<a id="currying"></a> ≡ ▶ Currying
<a id="I-arityN"></a> ≡ ▶ I.arityN(n, (x1, ..., xm) => y) ~> x1 => ... => xn => y
<a id="I-curry"></a> ≡ ▶ I.curry((x1, ..., xn) => y) ~> x1 => ... => xn => y
<a id="I-curryN"></a> ≡ ▶ I.curryN(n, (x1, ..., xn) => y) ~> x1 => ... => xn => y
I.curryN(2, x => {
const x2 = x*x
return y => x2 + y
})(2, 3)
// 7
<a id="function-composition"></a> ≡ ▶ Function composition
<a id="I-compose2"></a> ≡ ▶ I.compose2(b => c, (a1, ..., aN) => b) ~> a1 => ... aN => c
<a id="I-pipe2"></a> ≡ ▶ I.pipe2((a1, ..., an) => b, b => c) ~> a1 => ... aN => c
<a id="sequencing"></a> ≡ ▶ Sequencing
<a id="I-seq"></a> ≡ ▶ I.seq(value, ...fns) ~> value
<a id="I-seqPartial"></a> ≡ ▶ I.seqPartial(maybeValue, ...fns) ~> maybeValue
<a id="basic-combinators"></a> ≡ ▶ Basic combinators
<a id="I-always"></a> ≡ ▶ I.always(x, _) ~> x
<a id="I-apply"></a> ≡ ▶ I.apply(x => y, x) ~> y
<a id="I-id"></a> ≡ ▶ I.id(x) ~> x
<a id="I-snd"></a> ≡ ▶ I.snd(_, x) ~> x
<a id="constants"></a> ≡ ▶ Constants
<a id="I-array0"></a> ≡ ▶ I.array0 ~> []
I.array0
is an
empty
frozen array
[]
.
<a id="I-object0"></a> ≡ ▶ I.object0 ~> {}
I.object0
is an
empty
frozen object
{}
.