diff options
| author | Chouser <chouser@n01se.net> | 2014-01-29 20:05:05 -0500 |
|---|---|---|
| committer | Chouser <chouser@n01se.net> | 2015-01-30 12:54:43 -0500 |
| commit | fb21afa71b4f73fa9c05c47e6b1c0f45d2144069 (patch) | |
| tree | 81ac4a0d48ef7cca6c89224b3c7c4acfe38a582c /ocaml/step2_eval.ml | |
| parent | efb850b5d5f8072c95fd0dc67383ffa308504f7b (diff) | |
| download | mal-fb21afa71b4f73fa9c05c47e6b1c0f45d2144069.tar.gz mal-fb21afa71b4f73fa9c05c47e6b1c0f45d2144069.zip | |
OCaml: Add Step 8
Diffstat (limited to 'ocaml/step2_eval.ml')
| -rw-r--r-- | ocaml/step2_eval.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ocaml/step2_eval.ml b/ocaml/step2_eval.ml index 50751f9..62de875 100644 --- a/ocaml/step2_eval.ml +++ b/ocaml/step2_eval.ml @@ -9,7 +9,7 @@ module Env = end)*) ) -let num_fun f = T.Fn +let num_fun f = Types.fn (function | [(T.Int a); (T.Int b)] -> T.Int (f a b) | _ -> raise (Invalid_argument "Numeric args required for this Mal builtin")) @@ -40,7 +40,7 @@ let rec eval_ast ast env = and eval ast env = let result = eval_ast ast env in match result with - | T.List { T.value = ((T.Fn f) :: args) } -> (f args) + | T.List { T.value = ((T.Fn { T.f = f }) :: args) } -> (f args) | _ -> result let read str = Reader.read_str str |
