How Do I Learn Functional Programming In Javascript? - Linkpost

来源:转载

Hi, this is a "Linkpost".

In articles like that I collect all links I personally find relevant to the topic you see in the title.

I will update this post periodically.

If you find it useful, consider subscribingto my blog (the button is in the header) or my twitter.

Theory Books

RxJS

Describes what is RxJS and how do you use it.

Mostly adequate guide to FP (in javascript)

One of the best books for novices in Functional Programming.

All examples use Javascript.

A way to go for starters!

JavaScript Allongé

Dives deep in such topics as decorators, combinators, and high-level functions.

If you do not feel like you are ready to deal with monads and immutability, start with this book.

The list of books related to Functional Programming, in general, will be posted as a separate article

Understanding basics (what is functional programming)

A guide to functional programming techniques

Introduces the ideas of "imperative vs declarative programming", higher-order functions, and some FP tools. Includes straightforward examples.

Homoiconicity

A deprecated blog on Github, describing a lot of FP-related ideas in depth.

Straightforward (Live) Functional JavaScript: Building the Yome Widget

A step-by-step tutorial on how you can use FP in Javascript with good explanations for some details.

Understanding Combinators and High Order Functions Video - Javascript Combinators Understanding transducers http://phuu.net/2014/08/31/csp-and-transducers.html http://blog.cognitect.com/blog/2014/8/6/transducers-are-coming http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data Understanding FRP, CES and things like that https://github.com/Reactive-Extensions/RxJS/wiki/Recipes A General Theory of Reactivity A huge blog post describing the idea of "reactive programming" and things like Promises, Reactive Streams, etc. The introduction to Reactive Programming you've been missing Describes the ideas behind RxJS with examples and "marble diagrams". Understanding Tacit Programming Style Video - Hey Underscore, You're Doing It Wrong Understanding Abstract Data Types

What the Heck are Algebraic Data Types? ( for Programmers )

A very good and straightforward explanation of ADTs.

Understanding Monads (useless without practice)

State Monad in javascript

One of the best explanations of monads with Javascript IMO.

Starts from the problem to be solvedand shows how one can come to the idea of a monad.

Handling I/O with the state monad in JavaScript

Good explanation on what is State monad and how and why you can use it in Javascript.

Reader Monad in MonetJs

Nice description of Reader monad, showing how you can get Dependency Injection for Functional Programming.

Yet another Clojure library for monads

Advanced topicfor those, who are somehow familiar with monads and wants more insights.

Understanding Category Theory (advanced topic)

Videos - Category Theory for JS Programmers

A set of videos explaining Category Theory (the underlying theoretical basis of Functional Programming) for Javascript programmers.

Specifications

Fantasy Land

An attempt to standardise Functional Programming in Javascript and to let more libraries interoperate.

Promises/A+

Standard for Promises (Futures) in Javascript.

Promises are monad-like abstractions, but in Javascript they have a simplified API and restricted composability.

Reactive Streams

A standard for Reactive Streams - compositional event processing, close to FRP ideas. Think RxJs.

Practice Pattern Matching

Sparkler- https://github.com/natefaubion/sparkler

A "native" pattern matching library, which is built on top of a macros library for javascript.

It means you can get pattern matching support on language level, and not just by using some weird library syntax.

Data Structures

Mori- http://swannodette.github.io/mori/

A port of ClojureScript immutable data structures to Javascript. Written by the same author, who is the core contributor to ClojureScript. The API is adapted for Javascript.

ImmutableJs- https://facebook.github.io/immutable-js/

Immutable data structures for Javascript, written by Facebook. Get a lot of fuss and marketing support around.

De-facto standard library these days when people talk about immutability in Javascript.

Seamless-immutable- https://github.com/rtfeldman/seamless-immutable

Immutable structures, that are backward compatiblewith default arrays and objects in Javascript.

It means you can use the standard built-in language features to work with them (like forexpressions)

Transducers

TransducersJS- https://github.com/jlongster/transducers.js

An implementation, inspired by ClojureScript transducers.

Faster then lodash, compatible with native data structures.

Transduce-streams- https://github.com/transduce/transduce-stream

Use transducers (e.g. transducersJS) with NodeJs Streams.

FRP-like stuff

Model- https://github.com/curran/model

Data Visualization in reactive style

RxJS- https://github.com/Reactive-Extensions/RxJS

Combinational Event System for dealing with async data flows. Removes "accidental complexity" from async code. Think Promises, but better.

Directly related to "Reactive Extension" and "Reactive Streams".

De-facto standard when people talk about "reactive streams" or "FRP" in Javascript.

Bacon.js- https://baconjs.github.io/

The same thing as RxJs, but with an easier API.

Highland- http://highlandjs.org

A library to deal with NodeJS streams easier. Works both on a server and in a browser.

Kefir- https://rpominov.github.io/kefir/

The same as BaconJS or RxJS, but faster.

Most- https://github.com/cujojs/most

The same as BaconJS, RxJS, Kefir, but monadic(easily composable with other FP idioms) and implements Fantasy Landabstractions .

js-csp- https://github.com/ubolonton/js-csp

Implementation of Communicating Sequential Processes (like ClojureScript core.async, or Go goroutines) in Javascript.

Ported from ClojureScript.

Generic functional libraries

Lodash- https://github.com/lodash/lodash

A general-purpose toolkit, including some functional programming concepts.

If you are just starting with FP, I'd suggest starting with Lodash!

Ramda- http://ramdajs.com/docs/

Like Lodash, but more focusedon functional programming, immutability and interoperation with other libraries and standards (like Fantasy Land and ImmutableJS)

Lodash-fp- https://github.com/lodash/lodash-fp

Lodash for Tacit Programming style (see theorysection above for details on tacit programming)

Bilby- http://bilby.brianmckenna.org

Heavily functional and serious library.

Includes data structures, QuickCheck testing, operator overloading, multimethods.

Does not have a friendly syntax, IMO. Not for people who just start with FP.

Monads

Monet.js- http://cwmyers.github.io/monet.js/

Implements some of the most useful monads in Javascript.

Sanctuary- https://github.com/plaid/sanctuary

Implements some monads in Javascript.

Based on and works nicely with Ramda.



分享给朋友:
您可能感兴趣的文章:
随机阅读: