Simplify Env.get

we already have Var.equal now
This commit is contained in:
Rudi Grinberg 2018-03-12 10:46:58 +07:00
parent f4955cdc22
commit 1f99d0fb70
1 changed files with 1 additions and 4 deletions

View File

@ -35,10 +35,7 @@ let make vars =
}
let get t k =
List.find_map t.vars ~f:(fun (k', v) ->
match Var.compare k k' with
| Ordering.Eq -> Some v
| _ -> None)
List.find_map t.vars ~f:(fun (k', v) -> Option.some_if (Var.equal k k') v)
let to_unix t =
match t.unix with