In computer programming, cons is a fundamental function in most dialects of the Lisp programming language. cons constructs (hence the name) memory objects which hold two values or pointers to values. These objects are referred to as (cons) cells, conses, or (cons) pairs. In Lisp jargon, the expression "to cons x onto y" means to construct a new object with (cons x y).
| Property | Value |
| dbpedia-owl:thumbnail
| |
| dbpprop:abstract
|
- In computer programming, cons is a fundamental function in most dialects of the Lisp programming language. cons constructs (hence the name) memory objects which hold two values or pointers to values. These objects are referred to as (cons) cells, conses, 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), and a right half (the second element), 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".
- In informatica, cons è una funzione fondamentale dei dialetti Lisp. Essa costruisce (in inglese construct) in memoria oggetti contenenti due valori o puntatori a valore. Questi oggetti vengono chiamati celle cons, coppie cons o semplicemente cons. Nel gergo Lisp, l'espressione "fare il cons di x su y" significa costruire un nuovo oggetto tramite (cons x y). L'oggetto risultante è una coppia, la cui metà sinistra è indicata con car (il primo elemento) e la metà destra (il secondo elemento) con cdr. Questa funzione è legata alla nozione di costruttore presente nella programmazione orientata agli oggetti, che crea un nuovo oggetto a partire da alcuni argomenti, e, più da vicino, è legata alla funzione costruttore dei sistemi a tipo dati algebrico. La parola "cons" e l'espressione "fare il cons su" vengono anche utilizzate più genericamente nel gergo della programmazione funzionale. A volte operatori che compiono una funzione simile, specialmente quando si lavora con le liste, sono pronunciati "cons". Un esempio è l'operatore :: del linguaggio ML, che aggiunge un elemento all'inizio di una lista.
|
| dbpprop:hasPhotoCollection
| |
| dbpprop:reference
| |
| rdf:type
| |
| rdfs:comment
|
- In computer programming, cons is a fundamental function in most dialects of the Lisp programming language. cons constructs (hence the name) memory objects which hold two values or pointers to values. These objects are referred to as (cons) cells, conses, or (cons) pairs. In Lisp jargon, the expression "to cons x onto y" means to construct a new object with (cons x y).
- In informatica, cons è una funzione fondamentale dei dialetti Lisp. Essa costruisce (in inglese construct) in memoria oggetti contenenti due valori o puntatori a valore. Questi oggetti vengono chiamati celle cons, coppie cons o semplicemente cons. Nel gergo Lisp, l'espressione "fare il cons di x su y" significa costruire un nuovo oggetto tramite (cons x y).
|
| rdfs:label
| |
| owl:sameAs
| |
| skos:subject
| |
| foaf:depiction
| |
| foaf:page
| |
| is dbpprop:redirect
of | |
| is owl:sameAs
of | |