Applying Functions
It's very common to want to "map" a function over multiple expressions:
Notes for Python programmers:
Map in the Wolfram Language is like map in Python, except that it can operate on arbitrary expression trees of any depth.
/@ ("slash at") is a short notation for Map:
Notes for Java programmers:
Map in the Wolfram Language works similarly to the Stream.map method in Java, except that Map can be applied to any kind of expression.
This uses a pure function:
Apply applies a function to multiple arguments:
Notes for Python programmers:
Apply in the Wolfram Language is similar to the unpacking operator * in Python.
Expressions have "levels"—corresponding to the number of indices needed to extract a part. Functions like Map can operate at specific levels.
Notes for Java programmers:
"Levels" are another name for dimensions of an array, but generalized for all symbolic expressions. Multi-dimensional operations like this are not built into Java and would normally require loops.
Notes for Python programmers:
"Levels" are like dimensions of an array, but generalized for all symbolic expressions. Python's array functions are typically set up only for one-dimensional arrays.