1.5.0 • Published 4 years ago
@blueghost/moonad v1.5.0
Moonad
Typed Functional Utility Library for TypeScript
moonad
brings to the table well-known patterns and features from strongly typed functional languages to TypeScript
import { Lazy } from "./Lazy"
const lazyApplier = Lazy.lazy(() => (x: number) => x * 2)
const lazyVal = Lazy.lazy(() => 3)
.apply(lazyApplier)
.map(x => x + 1)
console.log(lazyVal.value) // 7
Installation
To install the stable version:
npm i @blueghost/moonad
Using moonad
To use moonad simply use the following import syntax:
import { Lazy } from "@blueghost/moonad"
Documentation
You can find the automatically generated changelog here
The documentation in markdown format can be found here
Contributing
To contribute, check the contribution guide here
Licence
moonad
uses the MIT licence