Merge branch 'post-historic' of https://github.com/dboulytchev/compiler-workout-private into post-historic

This commit is contained in:
kverty 2019-09-10 00:49:43 +03:00
commit 686e3ff9d7
5 changed files with 18 additions and 5 deletions

View file

@ -389,7 +389,7 @@ module M = Map.Make (String)
(* Environment implementation *)
class env =
let chars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNJPQRSTUVWXYZ" in
let chars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" in
let make_assoc l i = List.combine l (List.init (List.length l) (fun x -> x + i)) in
let rec assoc x = function [] -> raise Not_found | l :: ls -> try List.assoc x l with Not_found -> assoc x ls in
object (self)