JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 65
  • Score
    100M100P100Q53901F
  • License MIT

Typescript library for functional programming.

Package Exports

  • sa-lambda
  • sa-lambda/Async
  • sa-lambda/Delay
  • sa-lambda/Effect
  • sa-lambda/Either
  • sa-lambda/Equal
  • sa-lambda/Functors/Alt
  • sa-lambda/Functors/Alternative
  • sa-lambda/Functors/Applicative
  • sa-lambda/Functors/Apply
  • sa-lambda/Functors/Bifunctor
  • sa-lambda/Functors/Category
  • sa-lambda/Functors/Chain
  • sa-lambda/Functors/ChainRec
  • sa-lambda/Functors/Comonad
  • sa-lambda/Functors/Contravariant
  • sa-lambda/Functors/Extend
  • sa-lambda/Functors/Filterable
  • sa-lambda/Functors/Foldable
  • sa-lambda/Functors/Functor
  • sa-lambda/Functors/Group
  • sa-lambda/Functors/HKT
  • sa-lambda/Functors/Monad
  • sa-lambda/Functors/Monoid
  • sa-lambda/Functors/Ord
  • sa-lambda/Functors/Plus
  • sa-lambda/Functors/Profunctor
  • sa-lambda/Functors/Semigroup
  • sa-lambda/Functors/Semigroupoid
  • sa-lambda/Functors/Setoid
  • sa-lambda/Functors/Traversable
  • sa-lambda/Iterator
  • sa-lambda/Math
  • sa-lambda/Maybe
  • sa-lambda/Pipe
  • sa-lambda/Predicate
  • sa-lambda/Refinement
  • sa-lambda/TupleT
  • sa-lambda/function
  • sa-lambda/index
  • sa-lambda/lib/sa-lambda
  • sa-lambda/lib/sa-lambda.min
  • sa-lambda/package.json

Readme

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)
  • 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)