let find_map t ~f = let rec loop = function | [] -> None | x :: l -> match f x with | None -> loop l | Some _ as r -> r in loop t