Skip to content

Last

Status: Stable

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

Description

Last[expr] gives the last element of expr.

Examples

No verified examples yet for this function.

Implementation notes

builtin_last (in src/part.c) takes a single argument and returns a deep copy of its final element (args[arg_count - 1]). It returns NULL (unevaluated) when the argument is atomic or empty.

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]:= Last[{a,b,c}]
Out[1]= c

Notes

Last[expr] returns the final element of any expression.