Rest

Rest[expr]

gives expr with the first element removed.

Details

  • Rest[expr] is equivalent to Drop[expr,1].

Examples

open allclose all

Basic Examples  (2)

Scope  (2)

The head need not be List:

Rest works on SparseArray objects:

Applications  (1)

Nest the operation of finding the rest of a list:

Properties & Relations  (1)

Rest[expr] is equivalent to Drop[expr,1]:

Possible Issues  (2)

The expression is evaluated before Rest is applied:

Rest always operates on the FullForm of expressions:

Introduced in 1988
 (1.0)