identity<T> function

  1. @useResult
T identity<T>(
  1. T x
)

The Identity function.

A function that always returns the value that was used as its argument, unchanged. That is, when ƒ is the identity function, the equality ƒ(A) = A is true for all values of A to which ƒ can be applied.

Read more: https://en.wikipedia.org/wiki/Identity_function

Implementation

@useResult
T identity<T>(T x) => x;