For other uses, see CAR (disambiguation), CDR (disambiguation), and CADR (disambiguation).
In computer programming, CAR (car) /kɑːr/ⓘ and CDR (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 xy)) evaluates to x, and (cdr (cons xy)) evaluates to y.
When cons cells are used to implement singly linked lists (rather than trees and other more complicated structures), the car operation returns the first element of the list, while cdr returns the rest of the list. For this reason, the operations are sometimes given the names first and rest or head and tail.
In computer programming, CAR (car) /kɑːr/ andCDR (cdr) (/ˈkʌdər/ or /ˈkʊdər/ ) are primitive operations on cons cells (or "non-atomic S-expressions")...
detection and recognition of images with typed characters. CARandCDR, in the programming language Lisp CDR coding, in the programming language Lisp CDR (file...
referred to as the car (the first element, or contents of the address part of register), and a right half, referred to as the cdr (the second element...
cell 0). The principle that the cdr in a list cell must point at another list is just a convention. If both carandcdr point at atoms, that will yield...
although nil is an atom and does not have any fields, the functions carandcdr accept nil and just return it, which is very useful and results in shorter...
(disambiguation) Heads and Tales (disambiguation) Obverse and reverse CARandCDR, use of "heads and tails" in programming Fish Heads and Tails, a 1989 album...
primeswrt[x;l] = if car[l] mod x=0 then primeswrt[x;cdr[l]] else cons[car[l];primeswrt[x;cdr[l]]] ; primes[l] = cons[car[l];primes[primeswrt[car[l];cdr[l]]]] ;...
structure with two slots, called its carandcdr. A list is a linked chain of conses or the empty list. Each cons's car refers to a member of the list (possibly...
McCarthy's paper and coded the eval function he described in machine code. The familiar (but puzzling to newcomers) names CARandCDR used in Lisp to describe...
compiled code, unless declared SPECIAL, and no error checking was done for inline operations such as CARandCDR. The Ncomplr compiler (mid-1970s) introduced...
2024 IMSA SportsCar Championship Previous 2023 Next 2025 Support series: Michelin Pilot Challenge VP Racing SportsCar Challenge Lamborghini Super Trofeo...
Alessandra". CDR Cairo Blog (in Italian). Archived from the original on 1 April 2013. Retrieved 30 July 2012. "42 Skiers Are Killed in Italy When Cable Car Falls...
recursion. Tail recursion (or tail-end recursion) is particularly useful, and is often easy to optimize in implementations. Tail calls can be implemented...
in Formula One, IndyCar, the World Sportscar Championship, and NASCAR. He has also won races in midget car racing and sprint car racing. Andretti won...
"Swede" Savage Jr. (August 26, 1946 – July 2, 1973) was an American race car driver. He died at age 26 from complications while recovering from injuries...
wheel racing as both an entrant and a chassis constructor, and has won the Canadian-American Challenge Cup (Can-Am) sports car racing championship. McLaren...
Pilot Challenge will be the twenty-fifth season of the IMSA SportsCar Challenge and the eleventh season organized by the International Motor Sports Association...
Ronald James Bucknum (April 5, 1936 – April 23, 1992) was an American race car driver, born in Alhambra, California. Bucknum participated in 11 Formula...