Arc Forumnew | comments | leaders | submitlogin
2 points by nlavine 6155 days ago | link | parent

Hmm. A quick check in the arc interpreter reveals that (car nil) and (cdr nil) are both nil, so you're right about that.

However, there could be another reason this is working. In your particular example, the full expanded version of the function call is

  (foo . (nil . nil)),
or in other words,

  (cons foo
           (cons nil
                     nil)).
So it really should be destructuring that way anyway.

Now, having said that, can anyone give a good reason that (car nil) and (cdr nil) are nil? It seems a little strange to me, although I can see that it helps destructuring.