sa-lambda
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

Sa Lambda

NPM MIT Github codecov 996.icu

JS JS

Typescript library for functional programming.

Document

Modules

⚠️ sa-lambda is currently working in progress. ⚠️

  • [x] Either
  • [x] Maybe
  • [x] Iterator
  • [x] Pipe & Flow
  • [x] Equal
  • [x] Effect
  • [x] Math
  • [x] Async (Promise-Like)
  • [ ] 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

dependencies

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)

Package Sidebar

Install

npm i sa-lambda

Weekly Downloads

12

Version

1.5.0

License

MIT

Unpacked Size

961 kB

Total Files

450

Last publish

Collaborators

  • hfutsora