identity<T> function
T
identity<T>(
- T x
The identity function. While it might seem strange to have a function that just returns back the input, there are some interesting uses.
var function = conditional ? identity : manipulate;
Implementation
@pragma("vm:prefer-inline")
T identity<T>(T x) => x;