|
Alternatives
 | | ... is a pattern object which represents any of the patterns .
Example: _Integer | _Real represents an object with head either Integer or Real.
Unless the same set of pattern names appears in all of the , you cannot use these pattern names on the right-hand side of transformation rules for the pattern. Thus, for example, you can use x in a[x_] | b[x_], but you can use neither x nor y in a[x_] | b[y_].
See The Mathematica Book: Section 2.3.6.
See also: Optional.
Further Examples
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION. | |