Skip to content

Commit

Permalink
Add list function for compatibility with 4.08
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfugmann committed Apr 23, 2024
1 parent c2b5b95 commit abd3caa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugin/utils.ml
Expand Up @@ -70,6 +70,10 @@ module List = struct
| _ :: xs -> inner (i+1) xs
in
inner 0 lst

let rec find_map ~f = function
| [] -> None
| x :: xs -> match f x with Some _ as v -> v | None -> find_map ~f xs
end

module StringMap = struct
Expand Down

0 comments on commit abd3caa

Please sign in to comment.