@7urtle/lambda

Functional programming library in JavaScript.

Usage no npm install needed!

<script type="module">
  import 7urtleLambda from 'https://cdn.skypack.dev/@7urtle/lambda';
</script>

README

@7urtle/lambda

Functional programming library in JavaScript.

npm NpmLicense npm bundle size (minified) npm bundle size (minified + gzip)

@7urtle/lambda logo

Official Website

www.7urtle.com

Why @7urtle/lambda

Lambda was created to allows us to embrace functional programming in JavaScript. It focuses on providing highly performant code which is itself built using functional paradigms. Provided functions are simple, curried, pure and optimised for partial application and function composition.

Focus on your own skill level

@7urtle/lambda was written to help you transition towards functional programming no matter your skill level. You can pick up any functional features as you learn at your own pace. At the end you can master everything including pure functions, composition, currying, functors, and monads.

Learn JavaScript Functional Programming

Get Started

To use with Node.js:

$ npm install --save @7urtle/lambda

Require @7urtle/lambda in Node.js:

const L = require('@7urtle/lambda');

L.log('Hello world!');

Import @7urtle/lambda in Node.js:

import * as L from '@7urtle/lambda';

L.log('Hello world!');

Or import just specific functions:

import {log, upperCaseOf, compose} from '@7urtle/lambda';

const hello = compose(log, upperCaseOf);
hello('Hello World');
// => HELLO WORLD

Get the minified version from GitHub: lambda.min.js

<script src="./your/copy/of/lambda.min.js"></script>

<script>
// script on your website
// access @7urtle/lambda using the variable L
const message = L.upperCaseOf('hello world');
alert(message); // HELLO WORLD
</script>

Or use public CDN: https://www.jsdelivr.com/package/npm/@7urtle/lambda.

<script src="https://cdn.jsdelivr.net/npm/@7urtle/lambda@latest/dist/lambda.min.js"></script>

<script>
// script on your website
// access @7urtle/lambda using the variable L
const message = L.upperCaseOf('hello world');
alert(message); // HELLO WORLD
</script>

Try @7urtle/lambda with online playground using CodePen.