OneIdentity
is an attribute assigned to a symbol, say
f
, indicating thatf(x)
,f(f(x))
,… etc. are all equivalent tox
in pattern matching.
Examples
OneIdentity
affects pattern matching. It does not affect evaluation.
However, without a default argument, the pattern does not match:
OneIdentity
does not affect evaluation: