(* This uses the option type we discussed in class; * the caller should use pattern matching to extract * the return value. *) let rec get_nth (xs: string list)(n: int) : string option = match xs with | z::zs when n = 1 -> Some z | z::zs when n > 1 -> get_nth zs (n-1) | _ -> None