Skip to content

Most

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

Most[expr] gives all but the last element of expr.

Examples

No verified examples yet for this function.

Implementation notes

Algorithm. builtin_most returns a copy of the input with its last element dropped: it copies args 0 .. nāˆ’2 into a new function node with the same head. Returns NULL (unevaluated) for atoms or empty expressions.

Attributes: none registered.

Implementation status

Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

References

Notes & additional examples

Worked examples

In[1]:= Most[{a,b,c,d}]
Out[1]= {a, b, c}

Notes

Most[expr] drops the last element; it is the complement of Last.