cons

noun, verb — 2 senses

cons

noun

/ˈkɑnz/ · /ˈkɑns/

Etymology Clipping of construct.

1

Computing, Engineering, Mathematics, Natural sciences, Physical sciences, Programming, Sciences A data structure in Lisp that is a pair of pointers, car and cdr, used mainly for lists.

cons

verb

Etymology Clipping of construct.

1

Computing, Engineering, Mathematics, Natural sciences, Physical sciences, Programming, Sciences To obtain a list from a cons or a nesting of conses; to prepend an element to a list by forming a cons of that element and the list; to obtain a list from a smaller one by repeated application of such kind of prepending.

  • This version of length arises naturally from the recursive definition of a list: “a list is either the empty list or an element consed onto another list.”1992, Peter Norvig, Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp, Morgan Kaufmann, →ISBN, page 62:

Entry derived from the Wiktionary, under licence CC BY-SA 4.0 — list of authors.