Trying better format

This commit is contained in:
Ken Elf Mathieu Sternberg 2015-06-29 18:00:31 -07:00
parent d00f70db64
commit b9a54e4f3c
1 changed files with 16 additions and 36 deletions

View File

@ -18,42 +18,22 @@ contains a pointer to the next pair. Cons lists traditionally end
with a cdr object pointing to an empty list. The following functions with a cdr object pointing to an empty list. The following functions
are provided to create, identify, traverse, and modify cons lists. are provided to create, identify, traverse, and modify cons lists.
nil: An empty list, used as a static sentinel * `nil `: An empty list, used as a static sentinel
* `cons() `: Construct an empty list
cons(): Construct an empty list * `cons(obj)`: Create a new list of one object
* `cons(obj, lst)`: Append an object to the head of an existing list
cons(obj): Create a new list of one object * `car(lst)`: Return the contents of the current cell, or nil.
* `cdr(lst)`: Return a reference to the next item in the list, or nil.
cons(obj, lst): Append an object to the head of an existing list * `nilp(lst)`: (Boolean) is list an empty list?
* `pairp(obj)`: (Boolean) is this a object a pair?
car(lst): Return the contents of the current cell, or nil. * `listp(obj)`: (Boolean) is this object a list?
* `list(a, b, ...)`: Construct a list out of the arguments
cdr(lst): Return a reference to the next item in the list, or nil. * `vectorToList(v)`: Return a cons list given a vector. Recursive: if a vector is encountered inside v, it will be converted to a cons list.
* `listToVector(l)`: Return a vector given a cons list. Recursive: if car(l) is itself a cons list, the returned vector will contain an internal vector at that position.
nilp(lst): (Boolean) is list an empty list? * `setcar(obj, l)`: Replace the contents of car(l) with obj
* `setcdr(obj, l)`: Replace the contents of cdr(l) with obj
pairp(obj): (Boolean) is this a object a pair? * `cadr(lst), cddr(lst), cdar(lst), caar(lst), caddr(lst), cdddr(lst), cadar(lst), cddar(lst), caadr(lst), cdadr(lst)`: Common lisp functions that extend standard list addressing.
* `metacadr(string)`: For more complex addressing, metacadr() can be
listp(obj): (Boolean) is this object a list?
list(a, b, ...): Construct a list out of the arguments
vectorToList(v): Return a cons list given a vector. Recursive: if a
vector is encountered inside v, it will be converted to a cons list.
listToVector(l): Return a vector given a cons list. Recursive: if
car(l) is itself a cons list, the returned vector will contain an
internal vector at that position.
setcar(obj, l): Replace the contents of car(l) with obj
setcdr(obj, l): Replace the contents of cdr(l) with obj
cadr(lst), cddr(lst), cdar(lst), caar(lst), caddr(lst), cdddr(lst),
cadar(lst), cddar(lst), caadr(lst), cdadr(lst): Common
lisp functions that extend standard list addressing.
metacadr(string): For more complex addressing, metacadr() can be
provided with a string that describes the address desired, and returns provided with a string that describes the address desired, and returns
the qualifying function. For example, this library does not provide the qualifying function. For example, this library does not provide
caddddr(), but it can easily be generated: metacadr("caddddr") will caddddr(), but it can easily be generated: metacadr("caddddr") will