Skip to main content

inverseConstant()

inverseConstant<A>(_): <B>(b) => B

Corresponds to the encoding of false in the lambda calculus. Takes two arguments and always returns the second. Inverse of constant (K).

Type Parameters

A

A

The type of the first input value.

Parameters

_

A

Returns

<B>(b): B

Type Parameters

B

B

Parameters

b

B

Returns

B

Remarks

KI combinator

λab.b

inverseConstant :: a → b → b

pure function

Example

inverseConstant(1)(2);
// 2