This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching /

OneIdentity

FilledSmallSquare OneIdentity is an attribute that can be assigned to a symbol f to indicate that f[x], f[f[x]], etc. are all equivalent to x for the purpose of pattern matching.

FilledSmallSquare OneIdentity has an effect only if f has attribute Flat.

FilledSmallSquare Functions like Plus and Times have the attribute OneIdentity.

FilledSmallSquare The fact that Times has attribute OneIdentity allows a pattern like n_. x_ to match x.

FilledSmallSquare See Section 2.3.7 and Section 2.6.3.

FilledSmallSquare See also: Flat, Nest.

FilledSmallSquare New in Version 1.