Functional programming essentials for TypeScript
Eq
and
Ord
interfaces to implement equivalence relations and total orders.Semigroup
interface to implement semigroups.Maybe
.Either
.Validation
.Ior
and Pair
.Promise
values inside of
generator comprehensions using async
/await
syntax.neotype_prelude is available on NPM.
npm install @neotype/prelude
This library provides a suite of ES6 modules. A .js
suffix is required in
all import statements. All modules provide named exports.
import { cmb, Semigroup } from "@neotype/prelude/cmb.js";
import { cmp, eq, Eq, Ord } from "@neotype/prelude/cmp.js";
import { Either } from "@neotype/prelude/either.js";
import { Maybe } from "@neotype/prelude/maybe.js";
// etc.
See each module's documentation for recommended import practices and available exports.
This library takes inspiration from many existing functional programming languages and libraries, including:
Generated using TypeDoc