Given a list, arc> lst
(a b c d)
its cdr and nthcdr 1 look the same: arc> (cdr lst)
(b c d)
arc> (nthcdr 1 lst)
(b c d)
They think they're the same thing: arc> (is (cdr lst) (nthcdr 1 lst))
t
But they don't pop the same: arc> (pop (cdr lst))
b
arc> (pop (nthcdr 1 lst))
Error: "Can't set reference #<procedure: nthcdr> 1 (d . nil)"
Does anyone have insight into why this is? I must admit I'm perplexed. |