Skip to content

Instantly share code, notes, and snippets.

@bjdixon bjdixon/combinators.js
Last active Aug 29, 2015

Embed
What would you like to do?
Combinators in JavaScript (ES6)
// Kestrel
const K = ( x ) => ( y ) => x;
// Identity
const I = ( x ) => x;
// Vireo
const V = ( x ) => ( y ) => ( z ) => z( x )( z );
// Thrush
const T = ( x ) => ( y ) => y( x ), x;
// Why
const Y = ( x ) => ( ( y ) => y( y ) )( ( y ) => ( x( ( z ) => y( y )( z ) ) ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.