[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Taking CAR and CDR of hunks



    Date: 25 July 1981 23:46-EDT
    From: David Eppstein <KRONJ at MIT-MC>
    To: BUG-LISP at MIT-MC
    (car '(foo.))  => #777777
    (cdr '(foo.))  => FOO
    .  .  .
    Why are the CAR and CDR of a one-element hunk switched from what I
    would expect?  Maybe they should both return FOO, in my example above.
This example of 1-element hunks is just another reason why the idea of
treating hunks as generalized lists is bad.  Interpretively, at least,
CXR and RPLACX will certify the length before trying to access an i'th
element; CDR was defined to get the 0'th element, and CAR the 1'st element;
possibly extra code could be added to CAR to check for hunks of length 1.