Sa Lambda
Typescript library for functional programming.
Modules
sa-lambda
is currently working in progress.
- Either
- Maybe
- Iterator
- Pipe & Flow
- Equal
- Effect
- Math
- Async (Promise-Like)
- Tree
- Docs
- Functors
Installation
npm
npm install sa-lambda
yarn
yarn add sa-lambda
pnpm
pnpm add sa-lambda
Use
import { pipe } from "sa-lambda";
pipe(
1,
(num: number) => num + 1,
(num: number) => num + 2
);
import { flow } from "sa-lambda/pipe";
const f = flow(
(num: number) => num + 1,
(num: number) => num + 2
);
f(1);
f(2);
Functors
Inspired by
- fp-ts - Functional programming in TypeScript
- fantasy-land - Specification for interoperability of common algebraic structures in JavaScript
- sugar.js - Like syntactic sugar, but is library
License
The MIT License (MIT)