CONS
Also found in: Dictionary, Thesaurus, Medical, Legal, Acronyms, Idioms, Wikipedia.
Related to CONS: Pros and Cons, Best Buy
CONS
(1)cons
(2)/konz/ or /kons/ [LISP, "construct"] A Lisp function which
takes an element H and a list T and returns a new list whose
head is H and whose tail is T.
In Lisp, "cons" is the most fundamental operation for building structures. It actually takes any two objects and returns a "dotted-pair" or two-branched tree with one object hanging from each branch. Because the result of a cons is an object, it can be used to build binary trees of any shape and complexity.
In Lisp, "cons" is the most fundamental operation for building structures. It actually takes any two objects and returns a "dotted-pair" or two-branched tree with one object hanging from each branch. Because the result of a cons is an object, it can be used to build binary trees of any shape and complexity.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)