SetDelayed¶
Defines a delayed assignment that evaluates the RHS each time.
The right-hand side is a template: a Function parameter that is itself a
pattern variable is a slot the caller fills, so the symbol passed in really
does become the pure function's argument.
A parameter the caller did not supply still binds, and is renamed when an incoming value would otherwise be captured by it.
A list on the left-hand side destructures the argument, and it keeps
destructuring through elements that are themselves calls: names bound inside
foo[…] are as available to the body as those bound by a nested list.
$ wo 'edge[{f : foo[{lo_, hi_}, ___]}] := {f, lo, hi}; edge[{foo[{0, 1}, extra]}]'
{foo[{0, 1}, extra], 0, 1}
An argument sequence in such an element leaves the positions around it readable: earlier arguments count from the front and later ones from the back.