slovo | definícia |
cons cell (foldoc) | cons cell
/konz sel/ or /kons sel/ A Lisp pair object
containing any two objects. In Lisp, "cons" (short for
"construct") is the fundamental operation for building structures
such as lists and other binary trees. The application of
"cons" to objects H and T is written
(cons H T)
and returns a pair object known as a "cons", "cons cell" or
dotted pair.
Typically, a cons would be stored in memory as a two consecutive
pointers.
The two objects in a cons, and the functions to extract them, are
called "car" and "cdr" after two 15-bit fields of the {machine
code} instruction format of the IBM 7090 that hosted the
original LISP implementation. These fields were called the
"address" and "decrement" parts so "car" stood for "Contents of
Address part of Register" and "cdr" for "Contents of Decrement
part of Register".
In the typical case where the cons holds one node of a list
structure, the car is the head of the list (first element) and
the cdr is the tail of the list (the rest). If the list had
only one element then the tail would be an empty list, represented
by the cdr containing the special value "nil".
To aid in working with nested structures such as lists of lists,
Lisp provides functions to access the car of the car ("caar"), the
car of the cdr ("cadr"), the cdr of the car ("cdar") and the cdr
of the cdr ("cddr").
(2014-11-09)
Conseil Européen pour la Normalisation
European Committee for Standardization
|
| |
Nenašli ste slovo čo ste hľadali ? Doplňte ho do slovníka.
na vytvorenie tejto webstránky bol pužitý dictd server s dátami z sk-spell.sk.cx a z iných voľne dostupných dictd databáz. Ak máte klienta na dictd protokol (napríklad kdict), použite zdroj slovnik.iz.sk a port 2628.
online slovník, sk-spell - slovníkové dáta, IZ Bratislava, Malé Karpaty - turistika, Michal Páleník, správy, údaje o okresoch V4