Cons

From JargonWiki

Jump to: navigation, search
The Jargon File

Parts of this article are based on the Jargon File, v. 4.4.7,
a public domain document of hacker jargon.

Image:Glider-small.png
cons
/konz/
/kons/
Usage: vt. esp.
Derivation: From LISP


cons: /konz/ /kons/ vt. esp.

[from LISP]

  1. vt. To add a new element to a specified list, esp. at the top. "OK, cons picking a replacement for the console TTY onto the agenda."
  2. cons up: vt. To synthesize from smaller pieces: "to cons up an example".

In LISP itself, cons is the most fundamental operation for building structures. It takes any two objects and returns a dot-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. Hackers think of it as a sort of universal constructor, and that is where the jargon meanings spring from.

Sources

Source: cons, in The Jargon File, version 4.4.7.


Public Domain

This article is in the public domain and is not subject to copyright, trademark, or any other legal protection of intellectual property.
Any and all user contributions to this page are also immediately dedicated to the public domain.
Editors of this page must accede to these terms as special conditions of the standard editing privileges.

Image:Public_Domain_sm.png
Personal tools
Toolbox