Skip to content

soraLib/sa-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sa Lambda

NPM MIT 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)