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
The type of the input value.
Parameters
x
A
The value to return.
Returns
A
Remarks
I combinator
λa.a
identity :: a → a
pure function
Example
identity(4);
// 4