let tail = function l -> if l <> [] then List.tl l else failwith ("tail : requires a nonempty list as its argument")