CAR and CDR

In computer programming, car /ˈkɑːr/ and cdr (/ˈkʌdər/ or /ˈkʊdər/) are primitive operations on cons cells (or "non-atomic S-expressions") introduced in the Lisp programming language. A cons cell is composed of two pointers; the car operation extracts the first pointer, and the cdr operation extracts the second. Thus, the expression (car (cons <i>x</i> <i>y</i>)) evaluates to <i>x</i>, and (cdr (cons <i>x</i> <i>y</i>)) evaluates to <i>y</i>.

CAR and CDR

In computer programming, car /ˈkɑːr/ and cdr (/ˈkʌdər/ or /ˈkʊdər/) are primitive operations on cons cells (or "non-atomic S-expressions") introduced in the Lisp programming language. A cons cell is composed of two pointers; the car operation extracts the first pointer, and the cdr operation extracts the second. Thus, the expression (car (cons <i>x</i> <i>y</i>)) evaluates to <i>x</i>, and (cdr (cons <i>x</i> <i>y</i>)) evaluates to <i>y</i>.