| Some x -> Some (f x)
;;
+let option_get = function
+ | Some x -> x
+ | None -> failwith "option_get: None"
+;;
+
let rec find_opt f =
function
[] -> None
let print_name l n =
if n = -1
then "*"
+ else if n < 0 then "c" ^ string_of_int n
else if n >= List.length l then "x" ^ string_of_int (List.length l - n - 1) else List.nth l n
end