Skip to content

Latest commit

 

History

History
89 lines (63 loc) · 1.94 KB

README.md

File metadata and controls

89 lines (63 loc) · 1.94 KB

Sa Lambda

NPM MIT Deploy Docs Github codecov 996.icu

JS JS

Typescript library for functional programming.

Document

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

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)