church2.1.0 • Public • Published
Church encoding is a way of encoding data using only functions. For instance, we can use functions to represent, booleans, numerals and lists. Higher-order functions are all you need for Turing completeness.
Check out the docs.
npm i church
const twoFourSix = three// => church encoded list of [two four six]const twoFourSixJs =// => [2, 4, 6] (standard JS array of standard JS numbers)// => church encoded list of [two four six] againtwoFourSix// => church encoded list of [five five six]
- combinators-js - a library of combinators in JS I wrote
- http://raganwald.com/2015/02/13/functional-quantum-electrodynamics.html - totally mind-blowing article, this repo probably would not exist if I hadn't read it