Pattern
name{BLANKFORM}
is equivalent to Pattern[name, {BLANKFORM}]
and can be used in pattern matching to refer to the matched expression as name
, where {BLANKFORM}
is one of {_, __, ___}
.
name{BLANKFORM}head
is equivalent to Pattern[name, {BLANKFORM}head]
and can be used in pattern matching to refer to the matched expression as name
, where {BLANKFORM}
is one of {_, __, ___}
.
Attributes[Pattern] := {HoldFirst, Protected}
Simple examples
To demonstrate referencing name
in the replacement RHS:
Further examples
To demonstrate patterns matching a sequence of expressions: