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