Pairs and Lists
~~~~~~~~~~~~~~~

The `(scheme list)` and `(rnrs lists)` libraries now
provide a set of procedures that may supersede some
of the procedures described below.
If one of Larceny's procedures duplicates the semantics of
an R7RS or R6RS procedure whose name is different, then Larceny's
name is deprecated.

proc:append![args="list1 list2 ... obj",result="object"]
    
`append!` destructively appends its arguments, which must be lists, and
returns the resulting list. The last argument can be any object. The
argument lists are appended by changing the cdr of the last pair of
each argument except the last to point to the next argument.

proc:every?[args="procedure list1 list2 ...",result="object"]

If the lists have different lengths, they are in effect converted
to the length of the shortest list.  Element tuples are formed as
by applying `map` to the `list` procedure and the given lists.
`every?` applies _procedure_ to each of those element tuples in
first-to-last order, and returns `#f` as soon as _procedure_ returns
`#f`. If _procedure_ does not return `#f` for any element tuple,
then the value returned by _procedure_ for the last element
tuple is returned.

proc:last-pair[args="list-structure",result="pair"]

`last-pair` returns the last pair of the _list structure_, which must be
a sequence of pairs linked through the cdr fields.

proc:list-copy[args="list-copy",result="list"]

`list-copy` makes a shallow copy of the _list_ and returns that copy.

proc:remove[args="key list",result="list"]
proc:remq[args="key list",result="list"]
proc:remv[args="key list",result="list"]
proc:remp[args="pred? list",result="list"]

Each of these procedures returns a new list which contains all the
elements of _list_ in the original order, except that those elements of
the original list that were equal to _key_ (or that satisfy _pred?_) are
not in the new list. Remove uses `equal?` as the equivalence predicate;
`remq` uses `eq?`, and `remv` uses `eqv?`.

proc:remove![args="key list",result="list"]
proc:remq![args="key list",result="list"]
proc:remv![args="key list",result="list"]
proc:remp![args="pred? list",result="list"]

These procedures are like `remove`, `remq`, `remv`, and `remp`,
except they modify _list_ instead of returning a fresh list.

proc:reverse![args="list",result="list"]

`reverse!` destructively reverses its argument and returns the reversed
list.

proc:some?[args="procedure list1 list2 ...",result="object"]

If the lists have different lengths, they are in effect converted
to the length of the shortest list.  Element tuples are formed as
by applying `map` to the `list` procedure and the given lists.
`some?` applies _procedure_ to each of those element tuples in
first-to-last order, and returns the first non-false value returned by
_procedure._ If _procedure_ does not return a true value for any
element tuple, then some? returns `#f`.

