awesome-fp-js
:sunglasses: A curated list of awesome functional programming stuff in js
https://github.com/stoeffel/awesome-fp-js
Last synced: 26 days ago
JSON representation
Community
Related Lists
- lucasviola/Awesome Functional Programming
- Awesome FRP JS
- xgrommx/Awesome Functional Programming
- Functional Programming Resources In JavaScript
- tk-learning-center/Functional Programming Learning Path - A Learning Path for Functional Programming
Talk
Functional Languages that Compile to JavaScript
Lenses
- ReScript - lang.org/bucklescript-rebranding)) ReScript is a type-safe language that compiles to the highest quality of clean, readable and performant JavaScript code.
- Scala.js - lang.org/) to JavaScript.
- Koka - oriented programming language that seperates pure values from side-effecting computations with a familiar JavaScript like syntax.
- TypeScript - TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
- ClojureScript
- GHCJS
- Js\_of\_ocaml
- Quack - A multi-paradigm programming language with gradual and duck typing that targets PHP and JS.
- ion - no BS JS
- RamdaScript - A Lisp that compiles to opinionated JavaScript on top of RamdaJS
- RacketScript
- ElixirScript - lang.org/), a dynamic, functional language designed for building scalable and maintainable applications, to JavaScript.
- Reason
- Gleam - Gleam is a typed, functional language that compiles to Erlang and JavaScript.
Libraries
Algebraic Data Types
- Fantasy Land
- immutable-ext - js).
- union-type
- freeky
- fantasy-combinators
- fantasy-birds
- crocks - TS.
- purify - Functional programming library for TypeScript focusing on ADTs. +CT, +TS.
- MojiScript - an async-first, opinionated, and functional language designed to have 100% compatibility with JavaScript engines
- Pratica - Small, simple, easy FP data types for pragmatic and productive developers who need to ship reliable code fast. +CT, +TS.
-
sweet-monads
- A collection of popular monads (such as
EitherandMaybe) and the lazy iterator. -
NeverThrow
- This package contains a
Resulttype that represents either success (Ok) or failure (Err). - Static Land
- daggy
- Sanctuary
- Fluture
- kudo-js - A small utility library with a set of Algebraic Data Types and Helper functions to help you write code in a functional programming style in Javascript
-
Tifi
- Tifi is a library for functional programming in TypeScript. It solves a problem of the existence of both
undefinedandnull. Tifi is inspired by the OCaml/Reason utilities for the option data type. +CT, +TS.
Data Structures
- Icepick
- Immer - on-write mechanism. +TS.
- Mori
- Baobab
- immutable-sequence.js
- Lazy.js
- DerivableJS
- imlazy
- collectable - performance immutable data structures for modern JavaScript and TypeScript applications. +TS.
- List - An extremely fast immutable list with a comprehensive functional API. Designed to seamlessly integrate with Ramda.
- TSTL - C++ STL (Standard Template Library) is implemented in TypeScript. STL Containers, iterators, algorithms and functors, that following functional programming rule, are provided. +TS.
- Timm
- prelude.ts - Immutable persistent collections, functional constructs such as Option and Either, and combinators. Implemented in Typescript but supports javascript too. +CT, +TS.
- Immutable.js
Lenses
- lenses
- optics
- ramda-lens
- fantasy-lenses
- nanoscope
- partial.lenses - performance optics library for JavaScript.
- shades - inspired lens-like library for Javascript.
- lodash/fp - curried, iteratee-first, data-last methods. +TS.
- remeda - friendly. +TS.
- Ramda
- Ramda Adjunct - maintained extension of Ramda.
- Ramda-extension - free functions composed only from Ramda functions.
- Rambda - A faster alternative to Ramda in under 10kB.
- Rambdax - Extended version of Rambda
- functional.js - free / tacit programming.
- 101 - TS
- fnuc
- barely-functional - TS.
- bluebird-promisell - A practical functional programming library for promises.
- preludejs - Hardcore Functional Programming for JavaScript. -TS.
- 1-liners - crafted with love and attention. -TS.
- fn-curry
- curry
- compose-function
- functionize - functional libraries functional.
- lambdajs
- react-on-lambda - Replace JSX in React with functions (currying, compositions and etc).
- trifl
- funcy
- date-fp - fp are pure, autocurried and will not mutate the date objects they are applied to.
- js-joda - driven and clean API based on the ISO8601 calendar.
- \_part\_
- FPO.js - argument style methods.
- fun-task
- most - high performance reactive programming to help you compose asynchronous operations on streams of values and events without many of the hazards of side effects and mutable shared state.
- zen-signals
- pico-lambda - Arrays, Strings and things the functional way. A 640b functional library based on native methods. -TS.
- Creed - minded async with advanced features: coroutines, promises, ES2015 iterables, fantasy-land. -TS.
- TGrid - Grid Computing Framework, Network & Thread extension of TSTL, supporting RFC (Remote Function Call). +TS.
- Ferrum - TS.
- fp-ts - Typed functional programming in TypeScript. +CT, +TS.
- iter-tools - a rich toolset for working with iterables, both sync and async. +TS.
- futil-js - A collection of functional utilities that could conceivably be part of a library like lodash/fp, but for some reason or other are not.
- rubico - 🏞 [a]synchronous functional syntax
- rocket-pipes - Powerful pipes, that chain Promise and ADT like Maybe or Either from popular FP libraries. +TS
- omg-curry - Comprehensive Curry Library with Operator Curry, Curry from functions, Decurry and Infifnite Curries.
- lfi - A Lazy Functional Iteration Library Supporting Sync, Async, and Concurrent Iteration.
- ts-multimethod - TypeScript multimethods inspired by Clojure multimethods. +TS
- ts-fp-di - Tiny TypeScript functional dependency injection, based on Node.js AsyncLocalStorage. +TS
- effect-ts - fledged functional effect system for typescript with a rich standard library. +TS
- qio - safe, functional, performant, lawful, composable data structure that solves practical problems of effect-full code in node and browser. +TS
- Ditox.js - Powerful dependency injection container for building modular apps. +TS
- RxEffects - Reactive state and effect management with RxJS. +TS
- fxts - Lazy evaluation and concurrency. +TS
- ts-belt - Fast, modern, and practical utility library for FP in TypeScript. (Uses a data-first approach like remeda, but is faster than remeda, ramda, rambda, and lodash/fp.)
- true-myth - call style
- ts-pattern - The exhaustive Pattern Matching library for TypeScript, with smart type inference. Pattern Matching is a code-branching technique coming from FP languages.
- hyogwa - Natural 🌿 effect system that fits TypeScript; Write codes as you write plain typescript code.
- Verticalize - Super lightweight function that looks and behaves like a pipe operator.
- PureEval - A powerful JavaScript functional programming toolset, including utility functions and abstract data structures.
- context-fp - Microscopic functional programming context aka dependency injection. +TS
- klubok - Pipes with easy mocking, intended for huge amount of unit tests. +TS
- fp-filters - A curated collection of 130+ common-use filter functions.
- iterflow - Powerful iterator utilities for TypeScript with statistical operations, windowing, and lazy evaluation. +TS
- fp-dom
- Javascript Parser Combinator
- funfix
- fpEs - A small library provides simple usages of basic FP & pattern-matching/sumtype & MonadIO/Rx & Optional for Javascript. -TS.
- fp-multik - JS/TS lightweight value-multimethod util
- tinyeffect - A tiny TypeScript library for handling side effects in a unified way using algebraic effects. +TS
Programming Tools
Lenses
- eslint-plugin-fp - ESLint rules for functional programming
- 4.5 - oriented assertions that are lazy and monadic.
- hm-def
- ftor - A pluggable runtime type checker and functional debugging tool that supports parametric and row polymorphism, implicit rank-2 types and algebraic data types via Scott Encoding.
Resources
Articles
- FP Concepts in JavaScript
- Functors from first principle - explained with JS - Explaining functors concept using JavaScript.
- JavaScript and Type Thinking
- Lazy, composable, and modular JavaScript - of – in conjunction with higher-order functions, function composition, and lazy evaluation, to write cleaner and more modular JavaScript.
- Monads in JavaScript
- Functional programming
- Functional Programming for JavaScript People - A complete introduction to functional programming patterns by Chet Corcos with a lot of javascript examples.
- Introduction to Immutable.js and Functional Programming Concepts - Learn about functional data structures and their uses in this overview of Facebook's popular library for JavaScript: Immutable.js.
- Master the JavaScript Interview: What is Functional Programming? - A simple introduction by @ericelliott to functional principles and vocabulary.
- Composing Software - A series of articles on learning functional programming and compositional software techniques in JavaScript ES6+ from the ground up by @ericelliott.
- Anonymous Recursion in JavaScript - Short and easy to understand article about implementing anonymous recursion in JavaScript.
- Basic Monads in Javascript - Introduction to 2 easy monads in Javascript, Maybe & Either.
- F# for JavaScript Devs - Showcasing the similarities between F# and JavaScript
- A practical guide to writing more functional Javascript - A step by step guide to convert imperative JavaScript to more declarative, functional JavaScript.
- Functional programming with JavaScript
- Why Curry Helps
- A Monad in Practicality: First-Class Failures
- Functional Programming Jargon
- So You Want to be a Functional Programmer - Easy to understand, with some examples, introduction to Functional Programming in Javascript and Elm.
- You don't (may not) need loops âžż - Loops are one of the first constructs that junior programmers learn, but they can pose many potential issues in the software development process, and could be avoided in many cases.
- Why Ramda
- Favoring Curry - Practical applications of currying using Ramda.
- A gentle introduction to functional JavaScript - part series introduction functional programming in JavaScript that gets you up to speed what all the hype about functional programming is all about.
Books
- JavaScript Allongé
- Functional Programming in JavaScript - free explanations, this book teaches you how to apply functional programming to real-life development tasks. By Luis Atencio (2016)
- Grokking Simplicity - world scenarios. By Eric Normand (2019)
- Functional-Light JavaScript
- Professor Frisby’s Mostly Adequate Guide to Functional Programming - world examples. Strongly recommended. By Brian Lonsdorf (2016)
- Functional JavaScript
- scriptum - a no-frills functional programming library and a online course based on it
- Eloquent JavaScript
Examples and Exercises
- Hardcore Functional Programming in JavaScript - by-step with how to build an example web app using abstract interfaces like Monads, Functors, Monoids and Applicatives. (commercial)
- FPJS-Class
- functional-javascript-workshop
- functional-frontend-architecture - type-js + Flyd + Snabbdom
- cube-composer
- FP Youtube Search
- Escape from Callback Mountain - Design & refactoring tips for Promise-based Functional JavaScript. Key benefits include better readability, testability, and reusability. MIT.
- Learn Rx
- Holdem Evaluator - Yet another Holdem Evaluator with Ramda functional style
Videos
- Hey Underscore, You're Doing It Wrong!
- Functional programming patterns for the non-mathematician
- Pure JavaScript
- Anjana Vakil: Learning Functional Programming with JavaScript - JSUnconf 2016 - A simple and understandable introduction of functional proramming in javascript.
- Functional Programming Basics In ES6 - A complete introduction to functional programming in javascript made it easy by ES6.
- JavaScript Programmers Should Learn Algebraic Data Types -- May 2018 -- UtahJS Lehi - Seth House explains how ADTs (Algebraic Data Types) can be useful to JavaScript developers.
- Classroom Coding with Prof. Frisby