Scheme base library for pairs and lists
. __Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).'$scml_exports'/0 | |
'list-copy'/1 | Equivalent to list(obj). |
'list-ref'/2 | Returns the kth element of list. It is an error if list has fewer than k elements. . |
'list-set!'/3 | unsupported . |
'list-tail'/2 | Returns the sublist of list obtained by omitting the first k elements. It is an error if list has fewer than k elements. . |
'list?'/1 | Returns #t if obj is a (proper) list, otherwise returns #f. . |
'make-list'/1 | Equivalent to 'make-list'(K, '#f'). |
'make-list'/2 | Returns a list of k elements. . |
'null?'/1 | Returns #t if obj is the empty list, otherwise returns #f. . |
'pair?'/1 | Returns #t if obj is a pair, and otherwise returns #f. . |
'set-car!'/2 | unsupported . |
'set-cdr!'/2 | unsupported . |
append/1 | Returns a list consisting of the elements of the first list followed by the elements of the other lists. If there are no arguments, the empty list is returned. If there is exactly one argument, it is returned. An improper list results if the last argument is not a proper list. The last argument, if there is one, can be of any type. . |
assoc/5 | Equivalent to assoc(Obj, List, 'equal?'). |
assoc/6 | Return the first pair of alist whose car field is obj. If no pair in alist has obj as its car, then #f is returned. . |
assq/5 | Equivalent to assq(Obj, List, 'eq?'). |
assv/5 | Equivalent to assv(Obj, List, 'eqv?'). |
caar/1 | Returns the composition of car. . |
cadr/1 | Returns the composition of car and cdr. . |
car/1 | Returns the contents of the car field of pair. Note that it is an error to take the car of the empty list. . |
cdar/1 | Returns the composition of cdr and car. . |
cddr/1 | Returns the composition of cdr and cdr. . |
cdr/1 | Returns the contents of the cdr field of pair. Note that it is an error to take the car of the empty list. . |
cons/2 | Returns a pair whose car is obj1 and whose cdr is obj2. The
pair constructed by |
length/1 | Returns the length of list. . |
list/1 | Returns a list of the arguments. . |
member/5 | Equivalent to memq(Obj, List, 'equal?'). |
member/6 | Return the first sublist of list whose car is obj where the sublists of list are the non-empty lists returned by (list-tail list k) for k less than the length of list. If obj does not occur in the list, the #f is returned. . |
memq/5 | Equivalent to memq(Obj, List, 'eq?'). |
memv/5 | Equivalent to memq(Obj, List, 'eqv?'). |
reverse/1 | Returns a list consisting of the elements of list in reverse order. . |
'$scml_exports'() -> [{scm_symbol(), scmi_nip()}]
Equivalent to list(obj)
.
'list-ref'(List::scm_list(), K::scm_k()) -> scm_obj()
Returns the kth element of list. It is an error if list has fewer than k elements.
'list-set!'(List::scm_list(), K::scm_k(), Obj::scm_obj()) -> scm_false()
unsupported
'list-tail'(List::scm_list(), K::scm_k()) -> scm_list()
Returns the sublist of list obtained by omitting the first k elements. It is an error if list has fewer than k elements.
'list?'(T::scm_obj()) -> scm_boolean()
Returns #t if obj is a (proper) list, otherwise returns #f.
'make-list'(K::scm_k()) -> scm_list()
Equivalent to 'make-list'(K, '#f')
.
'make-list'(K::scm_k(), Fill::scm_obj()) -> scm_list()
Returns a list of k elements.
'null?'(X1::scm_obj()) -> scm_boolean()
Returns #t if obj is the empty list, otherwise returns #f.
'pair?'(X1::scm_obj()) -> scm_boolean()
Returns #t if obj is a pair, and otherwise returns #f.
'set-car!'(Pair::scm_pair(), Obj::scm_obj()) -> scm_false()
unsupported
'set-cdr!'(Pair::scm_pair(), Obj::scm_obj()) -> scm_false()
unsupported
append(Lists::scmi_vargs()) -> scm_list()
Returns a list consisting of the elements of the first list followed by the elements of the other lists. If there are no arguments, the empty list is returned. If there is exactly one argument, it is returned. An improper list results if the last argument is not a proper list. The last argument, if there is one, can be of any type.
assoc(Obj::scm_obj(), Alist::scm_alist(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_pair() | scm_false()
Equivalent to assoc(Obj, List, 'equal?')
.
assoc(Obj::scm_obj(), T::scm_alist(), Compare::scm_proc(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_pair() | scm_false()
Return the first pair of alist whose car field is obj. If no pair in alist has obj as its car, then #f is returned.
assq(Obj::scm_obj(), Alist::scm_alist(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_pair() | scm_false()
Equivalent to assq(Obj, List, 'eq?')
.
assv(Obj::scm_obj(), Alist::scm_alist(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_pair() | scm_false()
Equivalent to assv(Obj, List, 'eqv?')
.
caar(Pair::scm_pair()) -> scm_obj()
Returns the composition of car.
cadr(Pair::scm_pair()) -> scm_obj()
Returns the composition of car and cdr.
car(X1::scm_pair()) -> scm_obj()
Returns the contents of the car field of pair. Note that it is an error to take the car of the empty list.
cdar(Pair::scm_pair()) -> scm_obj()
Returns the composition of cdr and car.
cddr(Pair::scm_pair()) -> scm_obj()
Returns the composition of cdr and cdr.
cdr(T::scm_pair()) -> scm_obj()
Returns the contents of the cdr field of pair. Note that it is an error to take the car of the empty list.
cons(Obj1::scm_obj(), Obj2::scm_obj()) -> scm_pair()
Returns a pair whose car is obj1 and whose cdr is obj2. The
pair constructed by cons
is not guaranteed to be different (in
the sense of eqv?
) from every existing object.
length(List::scm_list()) -> scm_k()
Returns the length of list.
list(List::scm_list()) -> scm_list()
Returns a list of the arguments.
member(Obj::scm_obj(), List::scm_list(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_list() | scm_false()
Equivalent to memq(Obj, List, 'equal?')
.
member(Obj::scm_obj(), T::scm_list(), Compare::scm_proc(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_list() | scm_false()
Return the first sublist of list whose car is obj where the sublists of list are the non-empty lists returned by (list-tail list k) for k less than the length of list. If obj does not occur in the list, the #f is returned.
memq(Obj::scm_obj(), List::scm_list(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_list() | scm_false()
Equivalent to memq(Obj, List, 'eq?')
.
memv(Obj::scm_obj(), List::scm_list(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_list() | scm_false()
Equivalent to memq(Obj, List, 'eqv?')
.
reverse(List::scm_list()) -> scm_list()
Returns a list consisting of the elements of list in reverse order.