This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Attributes /

Listable

FilledSmallSquare Listable is an attribute that can be assigned to a symbol f to indicate that the function f should automatically be threaded over lists that appear as its arguments.

FilledSmallSquare Listable functions are effectively applied separately to each element in a list, or to corresponding elements in each list if there is more than one list.

FilledSmallSquare Most built-in mathematical functions are Listable.

FilledSmallSquare Example: Log is Listable. Log[a,b,c] LongRightArrow.

FilledSmallSquare All the arguments which are lists in a Listable function must be of the same length.

FilledSmallSquare Arguments that are not lists are copied as many times as there are elements in the lists.

FilledSmallSquare Example: Plus is Listable. a, b, c + x LongRightArrow.

FilledSmallSquare See Section 2.6.3.

FilledSmallSquare See also: Thread, Map, Sequence, SparseArray.

FilledSmallSquare New in Version 1.

Further Examples