(* * See the relevant discussion in sum-lists.fmsl. And see also the further * treatment of these ideas in ./list-funcs.fmsl. *) function car(l:integer*) = if #l = 0 then nil else l[1]; function cdr(l:integer*) = if (#l = 0) then nil else l[2..#l]; > car([]); > cdr([]); > car([1]); > cdr([1]); > car([1,2]); > cdr([1,2]); > car([1,2,3]); > cdr([1,2,3]);