identity()
identity<
A
>(x
):A
Mathematic identity function. A function that always returns the value that was used as its argument, unchanged.
Type Parameters
• A
Parameters
x
A
The value to return.
Returns
A
Remark
I combinator
Remark
identity :: a → a
Remark
λa.a
Remark
pure function
Example
identity(4);
// 4