<pair>

Type: <pair>

In MOSVM, as in Scheme, all lists are pairs. A Pair is two elements, a car and a cdr, represented as either a two-element list (1 2) or a "dotted pair" (1 . 2). The list (1 2 3 4) could also be represented as (1 . (2 . ( 3 . (4 . ())))). () or "null" is found in every list (but not in a dotted pair).

For an explanation of the relationship between Lists and Pairs, see <list>. (There is no list type. The entry is merely an explanation.)

PAIRS
caddr
cadr
car
cdr
cons
cons*
pair?
last-pair
map-car
map-cdr
set-car!
set-cdr!
null?

LISTS
list
list-index
list-ref
list?
length
reverse
reverse!
for-each
append
append!
apply
assq
map
memq
last-item
filter
filter!
find
find-tail
fold
req-arg