arc> (def terminator (l) (if acons.l (terminator cdr.l) l)) #<procedure: terminator> arc> (terminator (list 1 2 3 4 5 6)) nil arc> (terminator (mylist 1 2 3 4 5 6)) ()
-----
They both appear to have the same behaviour for car and cdr (return nil), and for scar and scdr (not allowed), and on top of that
arc> (is () nil) t
Arc lists are terminated by 'nil, Scheme lists by '(). Because Scheme lists sometimes appear in Arc, the Arc runtime (such as 'is) treats '() like 'nil.
Couldn't we drop one of these?
http://hacks.catdancer.ws/nil-impl-by-null.html ^_^