let rec get_nth (xs: string list)(n: int) : string = match xs with | z::zs when n = 1 -> z | z::zs when n > 1 -> get_nth zs (n-1) | _ -> failwith "n must be a positive integer such that 0 < n <= length"