Skip to content
Snippets Groups Projects
Commit e0f03f90 authored by Augustin Jaujay's avatar Augustin Jaujay
Browse files

WIP decrement

parent 93aa43fe
No related branches found
No related tags found
No related merge requests found
((fun x -> x + 1) 7)
(fun x -> (fun y -> x - y) 12) 8
\ No newline at end of file
......@@ -3,6 +3,8 @@ open BasicPfx.Ast
let increment env = env := (List.map (fun (name, v) -> print_endline (name ^ " is now associated to index " ^ (string_of_int (v+1))); (name, v+1)) !env)
(* let decrement env = env := (List.map (fun (name, v) -> print_endline (name ^ " is now associated to index " ^ (string_of_int (v-1))); (name, v-1)) !env); [] *)
let add_var var env = env := (var, -1)::(!env) ; print_endline (var ^ " was added to env with index -1")
let rec generate env = function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment