|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
Flat
Flat
is an attribute that can be assigned to a symbol f to indicate that all expressions involving nested functions f should be flattened out. This property is accounted for in pattern matching.
DetailsDetails
- Flat corresponds to the mathematical property of associativity.
- For a symbol f with attribute Flat,
is automatically reduced to
. - Functions like Plus, Times, and Dot are Flat.
- For a Flat function f, the variables x and y in the pattern
can correspond to any sequence of arguments. - The Flat attribute must be assigned before defining any values for a Flat function.
- When functions that are Flat are used in pattern matching, they often also require the attribute OneIdentity.
New in 1
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
