Add Env.update

This commit is contained in:
Rudi Grinberg 2018-03-22 22:42:42 +08:00
parent ab37e8ec22
commit 9f3eb956d3
2 changed files with 6 additions and 0 deletions

View File

@ -77,3 +77,6 @@ let diff x y =
| Some _ -> None
| None -> vx)
|> make
let update t ~var ~f =
make (Map.update t.vars var ~f)

View File

@ -23,4 +23,7 @@ val add : t -> var:Var.t -> value:string -> t
val diff : t -> t -> t
val update : t -> var:string -> f:(string option -> string option) -> t
val sexp_of_t : t -> Sexp.t