notes src identity-function.md
383 B · 11 lines
Markdown
at main

Identity Function #

The identity function is the @[function][functions] that takes a single parameter and returns it, unchanged. Though it sounds useless on its own, when doing @[functional programming][] the identity function often turns out to be useful when writing @[function compositions][function-composition].

To formally express the identity function:

$$ f(x) = x $$