We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Odoc_utils
List.find_map
1 parent e50abeb commit 6bb7627Copy full SHA for 6bb7627
src/odoc/bin/main.ml
@@ -594,17 +594,11 @@ end = struct
594
l
595
in
596
let o = Antichain.absolute_normalization o in
597
- (* Taken from OCaml 5.2 standard library *)
598
- let rec find_map ~f = function
599
- | [] -> None
600
- | x :: l -> (
601
- match f x with Some _ as result -> result | None -> find_map ~f l)
602
- in
603
match l with
604
| [] -> None
605
| _ ->
606
- find_map
607
- ~f:(fun (root, path) ->
+ Odoc_utils.List.find_map
+ (fun (root, path) ->
608
if Fpath.is_prefix path o then Some root else None)
609
610
0 commit comments