MapThread

MapThread[f,{{a1,a2,},{b1,b2,},}]

gives {f[a1,b1,],f[a2,b2,],}.

MapThread[f,{expr1,expr2,},n]

applies f to the parts of the expri at level n.

MapThread[f]

represents an operator form of MapThread that can be applied to an expression.

Details

Examples

open allclose all

Basic Examples  (4)

Apply f to corresponding pairs of elements:

In[1]:=
Click for copyable input
Out[1]=

Apply f to elements of a matrix:

In[1]:=
Click for copyable input
Out[1]=

Apply f to corresponding values of associations:

In[1]:=
Click for copyable input
Out[1]=

Use the operator form of MapThread:

In[1]:=
Click for copyable input
Out[1]=

Scope  (2)

Applications  (3)

Properties & Relations  (5)

Possible Issues  (2)

See Also

Apply  Map  Thread  Inner  Transpose  Through

Tutorials

Introduced in 1991
(2.0)
| Updated in 2016
(11.0)