Skip to content

Commit

Permalink
Fix BatHashtbl.Make.find_opt on OCaml < 4.05
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed May 4, 2024
1 parent 05c1c36 commit 6115df6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/batHashtbl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,8 @@ struct
let pos = key_index h key in
loop (Array.unsafe_get hc.data pos)

##V<4.05## let find_opt = find_option

let find_default h key defval =
let hc = h_conv (to_hash h) in
let rec loop = function
Expand Down

0 comments on commit 6115df6

Please sign in to comment.