Pairs and Lists

procedure append!

(append! list1 list2 ... obj) => 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.

procedure every?

(every? procedure list1 list2 ...) => object

every? applies procedure to each element tuple of lists in first-to-last order, and returns #f as soon as procedure returns #f. If procedure does not return #f for any element tuple of lists, then the value returned by procedure for the last element tuple of lists is returned.

procedure last-pair

(last-pair list-structure) => pair

last-pair returns the last pair of the list structure, which must be a sequence of pairs linked through the cdr fields.

procedure list-copy

(list-copy list) => list

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

procedures remove, remq, and remv

(remove key list) => list
(remq key list) => list
(remv key list) => 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 are not in the new list. Remove uses equal? as the equivalence predicate; remq uses eq?, and remv uses eqv?.

procedures remove!, remq!, and remv!

(remove! key list) => list
(remq! key list) => list
(remv! key list) => list

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

procedure reverse!

(reverse! list) => list

Reverse! destructively reverses its argument and returns the reversed list.

procedure some?

(some? procedure list1 list2 ...) => object

some? applies procedure to each element tuple of lists in first-to-last order, and returns the first non-#f value returned by procedure. If procedure does not return a true value for any element tuple of lists, then some? returns #f.


$Id: pairs_lists.html,v 1.6 2000/09/12 02:46:46 lth Exp $
larceny@ccs.neu.edu