FWIW, given something which returns an option you can use the "Alternative" pattern (for `'a option`):

```ocaml
let (<|>) a b = match a with
  | Some _ -> a
  | None -> b ()

let find' h k () =
  try
    let v = Hashtbl.find h k in
    Some v
  with Not_found ->
    None

let foo h1 h2 k f nf =
  let v = find' h1 k () <|> find' h2 k in
  match v with
    | Some v' -> f v'
    | None -> nf ()
```

Or similarly

```ocaml
let demo h k1 k2 v =
  find' h k1 ()
    <|> find' h k2
    <|> fun () -> Some v
```