CONS
\kˈɒnz], \kˈɒnz], \k_ˈɒ_n_z]\
Sort: Oldest first
-
/konz/ or /kons/ A Lisp function which takes anelement H and a list T and returns a new list whose head is Hand whose tail is T.In Lisp, "cons" (short for "construct") is the fundamentaloperation for building structures. It actually takes any twoobjects and returns them in a "cons cell" or pair object. This issometimes called a dotted-pair because an application of cons: (cons H T)can also be input and output using an infix dot operator: (H . T) (with suitable quoting of arguments).A cons cell can also be used as two-branched tree node object withone object hanging from each branch. Because the result of a consis itself an object, it can be used to build binary trees of anyshape and complexity.Typically, a cons would be represented in memory as a twoconsecutive pointers.For historical reasons, the functions to return the objects in acons are called car and cdr.
By Denis Howe
Word of the day
Platidiam
- An inorganic water-soluble platinum complex. After undergoing hydrolysis, it reacts DNA produce both intra interstrand crosslinks. These crosslinks appear to impair replication and transcription of DNA. The cytotoxicity cisplatin correlates with cellular arrest in G2 phase cell cycle.