let subst env s = String.concat "" begin List.map begin fun x -> match x with | A atom -> atom | V(var, _) -> List.assoc var env end s end