let rec last = function
  lx -> if is_empty_list (tail (lx))
          then head (lx) 
          else last (tail (lx))