# let rec last = function | [] -> None | [x] -> Some x | _ :: t -> last t;;val last : 'a list -> 'a option = <fun>