WLJS LogoWLJS Notebook

OneIdentity

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.

Examples

SetAttributes[f, OneIdentity];
MatchQ[f[x], x_]

Please visit the official Wolfram Language Reference for more details.

On this page