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:

Wolfram Research (1988), Rest, Wolfram Language function, https://reference.wolfram.com/language/ref/Rest.html.

Text

Wolfram Research (1988), Rest, Wolfram Language function, https://reference.wolfram.com/language/ref/Rest.html.

CMS

Wolfram Language. 1988. "Rest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Rest.html.

APA

Wolfram Language. (1988). Rest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Rest.html

BibTeX

@misc{reference.wolfram_2024_rest, author="Wolfram Research", title="{Rest}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Rest.html}", note=[Accessed: 12-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rest, organization={Wolfram Research}, title={Rest}, year={1988}, url={https://reference.wolfram.com/language/ref/Rest.html}, note=[Accessed: 12-December-2024 ]}