Constant

Published: 1/18/2020
Last edited: 1/26/2020

The constant function takes what it is given and returns a nullary function which returns the original value. Sometimes called always or the K combinator.

const K = x => () => x
// import { always as K } from 'ramda'
const alwaysCool = K('cool')
alwaysCool() === 'cool'
Published: 1/18/2020
Last edited: 1/26/2020
See this page on Github
Built with 💛 by Open Sorcerers
Created with Gatsby using the 😎 foresight starter