Skip to content

Latest commit

 

History

History
120 lines (110 loc) · 20.7 KB

functional-programming.md

File metadata and controls

120 lines (110 loc) · 20.7 KB

Functional Programming

Context: frontend-dev-bookmarks / Architecture

Functional programming is a programming paradigm, that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.

frontend.directory PayPal Beerpay Flattr Gitter Twitter


  • A Million Ways to Fold in JS: Brian Lonsdorf provides many functional alternatives to loops in this video.
  • A Monad in Practicality: First-Class Failures: This article shows how the Maybe monad can be used for handling simple failure use cases. It then extrapolates into complex failure scenarios and shows how these cases can be modelled in terms of the Either monad.
  • Allong.es: allong.es is a JavaScript library based on the function combinator and decorator recipes introduced in the book JavaScript Allongé.
  • Barely Functional: Tiny (2.7kb) functional programming library using native es5/6 operations.
  • Basic Lazy Evaluation and Memoization in JavaScript: Memoization is a way of optimizing code so that it will return cached results for the same inputs.
  • Bilby.js: A functional library based on category theory with immutable multimethods, functional data structures, functional operator overloading, automated specification testing.
  • Curry or Partial Application?: Eric Elliott describes the difference between partial application and curry.
  • Daggy: Library for creating tagged constructors (catamorphisms).
  • Date FP: Functional programming date manipulation library.
  • Debugging Functional: This post will demonstrate a simple solution that can go a long way to enhance the debugging experience in functional JavaScript applications.
  • Don’t Fear the Reader: Pascal Hartig explains how to use the reader monad in JavaScript.
  • Example Projects: Open source projects which use functional programming, preferably point-free and side-effect-free.
  • FP DOM: A collection of functions to favor functional programming in a DOM context.
  • Fantasy Combinators: Combinators which are used for fantasy-land projects.
  • Fantasy Land: Specification for interoperability of common algebraic structures in JavaScript.
  • Fantasy Lenses: Composable, immutable getters and setters.
  • Fluture: The debuggable Fantasy Land Future library.
  • Folktale: Folktale is a suite of libraries for generic functional programming in JavaScript that allows you to write elegant modular applications with fewer bugs, and more reuse.
  • Freeky: Collection of free monads by Brian Lonsdorf.
  • From Callback to Future -> Functor -> Monad: Yassine Elouafi goes through a simple implementation of Futures and compares them to Promises.
  • Functional Concepts For JavaScript Developers: Currying: Andrew Robbins talks about what currying is and why it's useful.
  • Functional Core Reactive Shell: Giovanni Lodi makes an overview of different architecture meta-patterns and describes his current findings about functional programming and observables as a way to control side effects.
  • Functional Frontend Architecture: This repository is meant to document and explore the implementation of what is known as "the Elm architecture". A simple functional architecture for building frontend applications.
  • Functional JavaScript Mini Book: Jichao Ouyang gives and introduction to functional programming with JavaScript and describes some Typeclasses like Functor and Monad.
  • Functional Javascript Workshop: The goal of this workshop is to create realistic problems that can be solved using terse, vanilla, idiomatic JavaScript.
  • Functional Principles In React: Jessica Kerr talks about four functional principles: Composition, Declarative Style, Isolation and Flow Of Data, and their usage in React.
  • Functional Programming Jargon: Jargon from the functional programming world in simple terms.
  • Functional Programming for JavaScript People: Chet Corcos explains different features of functional programming like composition, currying, lazy evaluation, referential transparency and compares Clojure with Haskell.
  • Functional Refactoring in JavaScript: In this article Victor Savkin shows how to apply functional thinking when refactoring JavaScript code. He does that by taking a simple function and transforming it into a more extendable one, which has no mutable state, and no if statements.
  • Functional.js: Functional.js is a functional JavaScript library. It facilitates currying and point-free / tacit programming and this methodology has been adhered to from the ground up.
  • Functionize: A collection of functions which aids in making non-functional libraries functional.
  • Futures and Monoids: Yassine Elouafi explains the nature of Monoids using Futures, Numbers and Strings as examples.
  • Futurizer: Turn callback-style functions or promises into futures!
  • Hey Underscore, You're Doing It Wrong!: In this talk Brian Lonsdorf gently takes a shot at underscore.js for not thinking about currying and partial function application in its library design.
  • Immutability, Interactivity & JavaScript: We'll dive in and see how trees of JavaScript arrays can permit building efficient immutable collections. Then we'll see how embracing immutable values dramatically simplifies some classic hard problems in client side programming including but not limited to undo, error playback, and online/offline synchronization.
  • Immutable Sequence.js: High performance implementation of Immutable Sequence in JavaScript, based on Finger Tree.
  • Immutable.js: Immutable persistent data collections for Javascript which increase efficiency and simplicity.
  • JSAir - Functional and Immutable Design Patterns in JavaScript: An episode of JavaScript Air about "the how and why of functional programming and immutable design patterns in JavaScript" with Dab Abramov and Brian Lonsdorf as guests.
  • JavaScript and Type Thinking: Yassine Elouafi introduces Algebraic Data Types with an example of a simple and a recursive type.
  • Javascript Combinators by Reginald Braithwaite: In this talk, we'll explore functions that consume and return functions, and see how they can be used to build expressive programs that hew closely to JavaScript's natural style.
  • Lamda.js: This library takes all the methods on instances of strings, arrays, objects, numbers, and regexp's and turns them into functions that can be used in a pointfree way.
  • Lazy Either: The LazyEither type is used to represent a lazy Either value. It is similar to the Future and Promise types.
  • Lenses Quick n’ Dirty: A video by Brian Lonsdorf that introduces lenses.
  • Lenses.js: Composable kmett style lenses.
  • Lodash/fp: The lodash/fp module is an instance of lodash with its methods wrapped to produce immutable auto-curried iteratee-first data-last methods.
  • Monad Transformers: Monad transformers are tricky, they require an excessive amount of type juggling. One of the aims of this package is to reduce the amount of wrapping and unwrapping needed for making a new transformer and to provide an easy way to define and combine transformers.
  • Monad a day 1: Reader: A video by Brian Lonsdorf explaining the Reader Monad.
  • Monad a day 2: Future: Brian Lonsdorf explains the Future monad in this video.
  • Monad a day 3: State: Brian Lonsdorf explains the State monad in this video.
  • Monads and Gonads: In this video from YUIConf 2012, Douglas Crockford attempts to break the long-standing Monad tutorial curse by explaining the concept and applications of monads in a way that is actually understandable to the audience.
  • Monads in JavaScript: This article explains monads and their usage in JavaScript including Identity, Maybe, List, Continuation, Do notation and Chaining.
  • Monat Transformers Library: Practical monad transformers for JS.
  • Monet.js: Monet is a tool bag that assists Functional Programming by providing a rich set of Monads and other useful functions.
  • Mori: A library for using ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript.
  • Mostly Adequate Guide to Functional Programming: A book by Brian Lonsdorf that introduces algebraic functional programming in JavaScript.
  • Nanoscope: Nanoscope is a javascript library designed to make complex transformations of data much easier. It is a built on the idea of a functional Lens - a construct that enables focusing on sub-parts of data structures to get and modify.
  • Pointfree Fantasy: Point-free wrappers for fantasy-land. Functions are curried using lodash's curry function, and receive their data last. Gives us aliases with our familar haskell names as well.
  • Pointfree Javascript: In this post Lucas Reis presents what is called pointfree style programming and goes through some common scenarios to demonstrate its benefits.
  • Practical Functional Programming: Pick Two: James Coglan tries to show in this video how to use functional concepts in daily JavaScript programming.
  • Practical Intro to Monads in JavaScript: A simple, practical tutorial for JavaScript developers showing how some monads can be used.
  • Practical Intro to Monads in JavaScript: Either: Jakub Strojewski describes the Either Monad, a tool for fast-failing, synchronous computation chains.
  • Practical Intro to Monads in JavaScript: Validation: Jakub Strojewski shows how to accumulate errors in a simple Validation use case.
  • Promises + FP = Beautiful Streams: Yassine Elouafi show how to use functional programming and algebraic data types to derive a pure functional definition of reactive programming like streams.
  • Pure JavaScript: Christian Johansen shows you how you can up your game by leaving loops behind and embracing functions as the primary unit of abstraction.
  • PureScript: PureScript is a strongly, statically typed language which compiles to JavaScript. It is written in and inspired by Haskell.
  • Ramda: A practical library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.
    • Practical Ramda - Functional Programming Examples: Tom MacWright gives some practical examples of Ramda usage.
  • Ramda Fantasy: Fantasy Land compatible types for easy integration with Ramda. This is an experimental project and will probably merge with Sanctuary.
  • Sanctuary: Sanctuary is a functional programming library inspired by Haskell and PureScript. It depends on and works nicely with Ramda. Sanctuary makes it possible to write safe code without null checks.
  • The Little Idea of Functional Programming: Jack Hsu tries to take a look at a couple of simple concepts that make up the little idea behind functional programming and to tie the concepts back to code examples in JavaScript.
  • Timm: Immutability helpers with fast reads and acceptable writes.
  • Transducers: Transducers are a powerful and composable way to build algorithmic transformations that you can reuse in many contexts.
  • Understanding Monads With JavaScript: The author starts with a problem of dealing with explicit immutable state and solves it with JavaScript using monads.
  • Union Type: Union types are a way to group different values together. Union-type is a small JavaScript library for defining and using union types.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Please provide a link back to this repository. This is not necessary for GitHub forks.