CAR AND CDR

About of CAR AND CDR









car & cdr - Programming in Emacs Lisp

  • Next: , Previous: , Up: 7.1 car and cdr The car of a list is, quite simply, the first item in the list.
  • . The cdr of a list is the rest of the list, that is, the cdr function returns the part of the list that follows the first item.
  • . Thus, while the car of the list '(rose violet daisy buttercup) is rose , the rest of the list, the value returned by the cdr function, is (violet daisy buttercup) .
  • . You can see this by evaluating the following in the usual way: (cdr '(rose violet daisy buttercup)) When you evaluate this, (violet daisy buttercup) will appear in the echo area.
  • . Like car , cdr does not remove any elements from the list—it just returns a report of what the second and subsequent elements are.
  • . Clearly, a more reasonable name for cdr would be rest .
  • . The people who come after you will be grateful to you.) When car and cdr are applied to a list made up of symbols, such as the list (pine fir oak maple) , the element of the list returned by the function car is the symbol pine without any parentheses around it.



    car, cdr, caar, cadr, cdar, cddr, caaar, caadr, cadar, caddr, cdaar, cdadr, cddar, cdddr, caaaar, caaadr, caadar, caaddr, cadaar, cadadr, caddar, cadddr, cdaaar,
  • 14.2.9 car, cdr, caar, cadr, cdar, cddr, caaar, caadr, cadar, caddr, cdaar, cdadr, cddar, cdddr, caaaar, caaadr, caadar, caaddr, cadaar, cadadr, caddar, cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar, cddddr Accessor Syntax: car x object | ( setf ( car x ) new-object ) cdr x object | ( setf ( cdr x ) new-object ) caar x object | ( setf ( caar x ) new-object ) cadr x object | ( setf ( cadr x ) new-object ) cdar x object | ( setf ( cdar x ) new-object ) cddr x object | ( setf ( cddr x ) new-object ) caaar x object | ( setf ( caaar x ) new-object ) caadr x object | ( setf ( caadr x ) new-object ) cadar x object | ( setf ( cadar x ) new-object ) caddr x object | ( setf ( caddr x ) new-object ) cdaar x object | ( setf ( cdaar x ) new-object ) cdadr x object | ( setf ( cdadr x ) new-object ) cddar x object | ( setf ( cddar x ) new-object ) cdddr x object | ( setf ( cdddr x ) new-object ) caaaar x object | ( setf ( caaaar x ) new-object ) caaadr x object | ( setf ( caaadr x ) new-object ) caadar x object | ( setf ( caadar x ) new-object ) caaddr x object | ( setf ( caaddr x ) new-object ) cadaar x object | ( setf ( cadaar x ) new-object ) cadadr x object | ( setf ( cadadr x ) new-object ) caddar x object | ( setf ( caddar x ) new-object ) cadddr x object | ( setf ( cadddr x ) new-object ) cdaaar x object | ( setf ( cdaaar x ) new-object ) cdaadr x object | ( setf ( cdaadr x ) new-object ) cdadar x object | ( setf ( cdadar x ) new-object ) cdaddr x object | ( setf ( cdaddr x ) new-object ) cddaar x object | ( setf ( cddaar x ) new-object ) cddadr x object | ( setf ( cddadr x ) new-object ) cdddar x object | ( setf ( cdddar x ) new-object ) cddddr x object | ( setf ( cddddr x ) new-object ) Pronunciation: : [ 'ka ' dEr ] : [ 'kadE ' dEr ] or [ 'ka ' düdEr ] : [ 'kü ' dEr ] : [ 'küdE ' dEr ] or [ 'kE ' düdEr ] Arguments and Values: x - a .



    Autonoleggio Italy by Car - Tariffa Web: Tariffa valida solo per prenotazioni online.
  • . o simile € 73, 70 € 409, 20 € 58, 46 € 1.531, 20 € 0, 26 O - FVMR Fiat Ulisse o simile € 117, 70 € 759, 00 € 108, 43 € 2.004, 20 € 0, 23 S - IWMR Fiat Stilo Multi Wagon 1.9 JTD o simile € 86, 00 € 469, 00 € 67, 00 € 1.425, 00 € 0, 29 X - MCAR Mercedes Smart o simile € 60, 50 € 342, 10 € 48, 87 € 1.093, 40 € 0, 19 LEGENDA Disponibile solo su prenotazione Clicca per verificare gli uffici in cui θ diponibile il gruppo LA SUDDETTA TARIFFA INCLUDE: Chilometraggio illimitato, CDR, TLR, oneri aeroportuali del 14%, oneri ferroviari del 6%, IVA e ROAD TAX Per i noleggi mensili la tariffa include 3.000 km.
  • . LA SUDDETTA TARIFFA NON INCLUDE: Multe, carburante, PAI ( Euro 1, 00 per giorno incluso tasse) Extra Driver ( Euro 1, 00 per giorno incluso tasse) SERVIZIO CARBURANTE: Euro 18, 00 incluso I.V.A, oneri aeroportuali e/o ferroviari, ove dovuto FRANCHIGIA CDR/TLR: In caso di incidente, danni, furto parziale o totale alla vettura sarΰ addebitata una franchigia esente IVA di Euro 850, 00 per i gruppi BA/CA/DA/X, per il gruppo L sarΰ addebitata una franchigia di Euro 1.900, 00 (esente IVA) per la CDR in caso di furto e incendio di Euro 2.400, 00 (esente IVA) per la TLR, per tutti gli altri gruppi Euro 1.600, 00 anche se θ stata accettata la CDR/TLR.



    PTC | Y. V. F. C.
  • . (globals ._setitem_("sg", globals ._setitem_), sg("glet", lambda **kw: globals .update(kw)), glet(yimport = lambda x: sg(x, _import_(x))), yimport("sys"), yimport("re"), glet(yprint = lambda x: sys.stdout.write(str(x)), yclass = lambda name, sclass= , **attribs: sg(name, type(name, sclass, attribs))), yclass("YObject", , clet = lambda self, **kw: self._dict_.update(kw)), yclass("Cons", (YObject, ), _init_ = lambda self, car, cdr: self.clet(car=car, cdr=cdr), tolist = lambda self: (self.cdr._class_ != Cons and [self.car, self.cdr] or [self.car] + self.cdr.tolist ), setcar = lambda self, x: self.clet(car=x), setcdr = lambda self, x: self.clet(cdr=x), _repr_ = lambda self: ( (self.cdr is None and ("%s" % repr_yobj(self.car))) or ((self.cdr._class_) != Cons and ("(%s .
  • . %s)" % (repr_yobj(self.car), repr_yobj(self.cdr)))) or (lambda l: (l[-1] is None and ("(" + " ".join([repr_yobj(i) for i in l[:-1]]) + ")") or ("(" + " ".join([repr_yobj(i) for i in l[:-1]]) + " .

  • info: CAR AND CDR


    Photo by


    LEARNING LISP - Lists, CAR and CDR
  • LEARNING LISP | Lists, CAR and CDR We are going to direct our attention towards the structure of data in the Lisp language.
  • . The two functions CAR and CDR are used to get parts out of lists.
  • . CDR [pronounced "could-er"] is the complement of CAR in that the result of CDR is the "rest" of the list: :(CDR '(1 2 3 4)) ( 2 3 4 ) :(CDR '(FUN FROG)) ( FROG ) :(CDR '((THREE BLIND) MACE)) ( MACE ) :(CDR '(HELLO)) NIL :(CDR ' ) NIL Like CAR, CDR is defined only to operate on lists.
  • . Unlike CAR, however, the value of CDR is ALWAYS a list.
  • . Note that the CDR of a list with only one element is an empty list [written as or NIL].
  • . NIL is a list (as a result of the CDR operation).
  • . It can be returned by functions whose value is defined to be an atom, such as a predicate, or by functions whose value is defined to be a list, such as CDR.
  • . Back to the business at hand: CAR and CDR.
  • . :(CDR '(SAND WITCH)) ( WITCH ) :(CDR (CDR '(SAND WITCH))) NIL :(CDR (CDR (CDR '(SAND WITCH)))) NIL :(CAR (CDR '(SAND WITCH))) WITCH :(CAR (CAR (CDR '( ((BOZO) ( NO NO)))))) ( BOZO ) :(CDR (CAR (CDR '( ((BOZO) (NO NO)))))) ( (NO NO ) ) :(CAR (CAR (CDR (CAR (CDR '( ((BOZO) (NO NO)))))))) NO :(CDR (CAR '((CAR CDR) CAR))) ( CDR ) :(CAR '(ADD 1 2)) ADD :(CDR '(ADD 1 2)) ( 1 2 ) As we mentioned a little earlier in this chapter, the expressions that we are typing into Lisp are lists, just as "(1 2 3 4)" is a list.


    Podcasts in my car via CDR sneakernet » Archive » Blog » 0xDECAFBAD
  • . Not too shabby, other than the fact that this approach would eventually leave me with a large pile of paper-encased CDR’s to either archive or toss.
  • . I really would like to reuse a handful of CDRW’s for a temporary sneakernet.
  • . But alas, it seems my Blaupunkt MP3 CD unit won’t read from CDRW’sβ€”at least, not the ones I have on hand.
  • . One Response to “Podcasts in my car via CDR sneakernet” Says: I have a friend who had success in improving the quality of the itrip transmission by .


    [1-6] What does CLOS, PCL, X3J13, CAR, CDR, ... mean?
  • Part1 - - - - - - - Top Document: Previous Document: Next Document: [ | ] [1-6] What does CLOS, PCL, X3J13, CAR, CDR, ...
  • . CDR Originally meant "Contents of Decrement portion of Register", which is what CDR actually did on the IBM 704.
  • . Pronounced "Cudder" /kUdd@r/ (as in "a cow chews its cdr").


    Car and cdr: Information From Answers.com
  • On this page: Car and cdr Car and cdr The correct title of this article is car and cdr .
  • . In the, car and cdr ( [kΙ™dΙ™r] or [kudΙ™r]) are a pair of primitive to extract the left and right half (respectively) of a cell.
  • . So, the expression (car (cons x y )) always evaluates to x , and (cdr (cons x y )) always evaluates to y .
  • . Use Since are built from cons cells in Lisp, car and cdr are also used to extract the head (first element) and tail (everything but the first element) from a list.
  • . (car '(a b c d)) yields a (cdr '(a b c d)) yields (b c d) As a special case, (car '(d)) yields d (cdr '(d)) yields the empty list, denoted nil in most dialects, including Common Lisp (but denoted in ) Since car and cdr are primitives of all Lisp dialects, many list manipulation functions can be defined in terms of them.
  • . For instance, suppose we wanted to return only the fourth value in a list: (defun fourth (x) (car (cdr (cdr (cdr x))))) In fact, we can go further, and define a function nth such that (nth n l ) evaluates to the ( n +1)th element of the list l : (defun nth (n list) (if (zerop n) (car list) (nth (- n 1) (cdr list)))) Names The names have their origin in the first implementation of Lisp on an computer, and retain their primacy for purely nostalgic reasons.

  • Benefits


    Photo by