In computer programming, cons ( or ) is a fundamental function in most dialects of the Lisp programming language. cons constructs memory objects which hold two values or pointers to values. These objects are referred to as (cons) cells, conses, non-atomic s-expressions ("NATSes"), or (cons) pairs. In Lisp jargon, the expression "to cons x onto y" means to construct a new object with (cons x y). The resulting pair has a left half, referred to as the car (the first element, or contents of the address part of register), and a right half (the second element, or contents of the decrement part of register), referred to as the cdr.

It is loosely related to the object-oriented notion of a constructor, which creates a new object given arguments, and more closely related to the constructor function of an algebraic data type system.

The word "cons" and expressions like "to cons onto" are also part of a more general functional programming jargon. Sometimes operators that have a similar purpose, especially in the context of list processing, are pronounced "cons". (A good example is the :: operator in ML, Scala, F# and Elm or the : operator in Haskell, which adds an element to the beginning of a list.)

ROCKSTAR

ROCKSTAR

August 28, 2020

Play on spotify
Sweet Dreams (Are Made of This)

Sweet Dreams (Are Made of This)

June 18, 2020

Play on spotify

Related artists

2beOK

2beOK

Snugs

Snugs

erdem kriser

erdem kriser

Labs

Labs

piXXel

piXXel

Duness

Duness

Olivia's Sister

Olivia's Sister

Annaland

Annaland

Another Kid

Another Kid

VIRTU

VIRTU

LZRD

LZRD

Leon Lour

Leon Lour

BoTalks

BoTalks

SAMAHTA

SAMAHTA

Highlnd

Highlnd

Chill Satellite

Chill Satellite

Chilled Velvet

Chilled Velvet

Kosling

Kosling

LÛMIS

LÛMIS

StayLoose

StayLoose