DOCUMENTATION CENTER SEARCH
Mathematica
>
Structural Operations on Expressions
>
Built-in
Mathematica
Symbol
Structural Operations
Tutorials »
|
Distribute
Map
Inner
MapThread
See Also »
|
Applying Functions to Lists
Expressions
List Manipulation
Manipulating Equations
Structural Operations on Expressions
More About »
Thread
Thread
[
f
[
args
]]
"threads"
f
over any lists that appear in
args
.
Thread
[
f
[
args
],
h
]
threads
f
over any objects with head
h
that appear in
args
.
Thread
[
f
[
args
],
h
,
n
]
threads
f
over objects with head
h
that appear in the first
n
args
.
MORE INFORMATION
Functions with attribute
Listable
are automatically threaded over lists.
All the elements in the specified
args
whose heads are
h
must be of the same length.
Arguments that do not have head
h
are copied as many times as there are elements in the arguments that do have head
h
.
»
Thread
specifies arguments using the standard sequence specification:
All
all elements
None
no elements
n
elements
1
through
n
-
n
last
n
elements
{
n
}
element
n
only
{
m
,
n
}
elements
m
through
n
inclusive
{
m
,
n
,
s
}
elements
m
through
n
in steps of
s
EXAMPLES
CLOSE ALL
Basic Examples
(3)
In[1]:=
Out[1]=
In[2]:=
Out[2]=
In[3]:=
Out[3]=
Convert equations for lists to lists of equations:
In[1]:=
Out[1]=
Apply a function to both sides of an equation:
In[1]:=
Out[1]=
Scope
(9)
Generalizations & Extensions
(1)
Applications
(3)
Properties & Relations
(3)
Possible Issues
(1)
SEE ALSO
Distribute
Map
Inner
MapThread
TUTORIALS
Structural Operations
MORE ABOUT
Applying Functions to Lists
Expressions
List Manipulation
Manipulating Equations
Structural Operations on Expressions
New in 1
© 2008 Wolfram Research, Inc.