type value = int;;
type variable = string;;

type environment =
    variable -> value;;

exception Unbound_variable of variable;;

let empty =
  fun a_variable ->
    raise (Unbound_variable a_variable);;

let bind variable_to_bind value_to_bind environment =
  fun searched_for_variable ->
    if searched_for_variable = variable_to_bind then
      value_to_bind
    else
      environment searched_for_variable;;

let rec lookup searched_for_variable environment =
  environment searched_for_variable;;
