const
The constant function from functional programming: it takes a value and returns a function that will return that value:
var constant = var alwaysA = ; //= 'a'
Useful to lifting a value into the world of functions, e.g. when using promises:
Other names it's gone by in the past:
- K combinator
- lift
- always