If you have a list of elements, it is often important to be able to apply a function separately to each of the elements. You can do this in Mathematica using Map. This ...
Many computations are conveniently specified in terms of applying functions in parallel to many elements in a list. Mathematica provides a suite of elegant functional ...
Long viewed as an important theoretical idea, functional programming finally became truly convenient and practical with the introduction of Mathematica's symbolic language. ...
In an expression like f[{a,b,c}] you are giving a list as the argument to a function. Often you need instead to apply a function directly to the elements of a list, rather ...
Many programs you write will involve operations that need to be iterated several times. Nest and NestList are powerful constructs for doing this. Applying functions of one ...
There are many functions that are built into Mathematica. This tutorial discusses how you can add your own simple functions to Mathematica. As a first example, consider ...
Mathematica's unified symbolic architecture allows immediate generalization of part-oriented list operations to arbitrary expressions —supporting operations both on ...
Defining Functions Functions as Procedures Manipulating Options
Mathematica provides several convenient methods for extracting and manipulating parts of matrices. The flexible [[ ]] (Part) and ;; (Span) syntaxes provide compact yet ...
Function[body] or body & is a pure function. The formal parameters are # (or #1), #2, etc. Function[x, body] is a pure function with a single formal parameter x. ...