HELP LAST                                        John Williams, September 1985

    last(<list | vectorclass | word>) -> <item>

This procedure returns the last element of its argument, which should be a
non-empty list, vector-type object (e.g. string or vector), or word. Thus:

    last([1 2 3 4]) =>
    ** 4

    last('abcde') =>
    ** 101

The *updater of LAST can be used to change the last item of a data structure.
For example:

    vars v = {what is the time};
    v =>
    ** {what is the time}
    "date" -> last(v);
    v =>
    ** {what is the date}

Note: you CANNOT alter the last character in a word this way.


See also:

    HELP *LISTS         for general information on lists
    HELP *VECTORS       for general information on vectors
    HELP *ALLBUTLAST    | how to access various portions of
    HELP *ALLBUTFIRST   |  lists and vectors
