Next: srfi ilists procs apply, Previous: srfi ilists procs replacement, Up: srfi ilists procs [Index]
These procedures convert between mutable and immutable pair structures.
These procedures, which are inverses, return an ipair and a pair respectively that have the same (i)car and (i)cdr fields as the argument.
These procedures return an ilist and a list respectively that have the same elements as the argument. The tails of dotted (i)lists are preserved in the result, which makes the procedures not inverses when the tail of a dotted ilist is a list or vice versa. The empty list is converted to itself.
It is an error to apply list->ilist
to a circular list.
These procedures return an ilist and a vector respectively that have the
same elements as the argument. The empty list is converted to an empty
vector. It is an error to apply ilist->vector
to a dotted list.
NOTE These functions are Vicare extensions.
These procedures walk a tree of pairs or ipairs respectively and make a deep copy of it, returning an isomorphic tree containing ipairs or pairs respectively. The result may share structure with the argument. If the argument is not of the expected type, it is returned.
These procedures are not inverses in the general case. For example, a
pair of ipairs would be converted by tree->itree
to an ipair of
ipairs, which if converted by itree->tree
would produce a pair of
pairs.
These procedures walk a generalized tree consisting of pairs, ipairs, or a combination of both, and make a deep copy of it, returning an isomorphic tree containing only ipairs or pairs respectively. The result may share structure with the argument. If the argument is neither a pair nor an ipair, it is returned.
Next: srfi ilists procs apply, Previous: srfi ilists procs replacement, Up: srfi ilists procs [Index]