Pattern

WMA link


Pattern[symb, pat]

symb : pat

assigns the name symb to the pattern pat.

symb_head

is equivalent to symb : _head (accordingly with __ and ___).

symb : pat : default

is a pattern with name symb and default value default, equivalent to Optional[pat : symb, default].

Pattern has attribute HoldFirst, so it does not evaluate its name:

Nested Pattern assigns multiple names to the same pattern. Still, the last parameter is the default value.

This is equivalent to:

FullForm:

OptionsPattern
Repeated