Most

Most[expr]

gives expr with the last element removed.

Details

  • Most[expr] is equivalent to Drop[expr,-1].

Examples

open allclose all

Basic Examples  (2)

Generalizations & Extensions  (2)

The head need not be List:

Most works on SparseArray objects:

Applications  (1)

Nest the operation of finding most of a list:

Properties & Relations  (1)

Most[expr] is equivalent to Drop[expr,-1]:

Possible Issues  (2)

The expression is evaluated before Most is applied:

Most always operates on the FullForm of expressions:

Introduced in 2003
 (5.0)