diff options
| author | Chouser <chouser@n01se.net> | 2015-01-26 23:05:13 -0500 |
|---|---|---|
| committer | Chouser <chouser@n01se.net> | 2015-01-30 12:54:43 -0500 |
| commit | 04e33074cc516fe4b79a6319c7a211002902a846 (patch) | |
| tree | 8f288508b0f9212e3b3d5e89f7ebd5e66f701b27 /ocaml/core.ml | |
| parent | e64878d0af10d7e391e2070ddd02756042bec7b9 (diff) | |
| download | mal-04e33074cc516fe4b79a6319c7a211002902a846.tar.gz mal-04e33074cc516fe4b79a6319c7a211002902a846.zip | |
Ocaml: All optional tests passing up thru step 4
Diffstat (limited to 'ocaml/core.ml')
| -rw-r--r-- | ocaml/core.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ocaml/core.ml b/ocaml/core.ml index f86c3e7..5cf06ba 100644 --- a/ocaml/core.ml +++ b/ocaml/core.ml @@ -27,7 +27,11 @@ let init env = begin Env.set env (Types.symbol "count") (T.Fn (function [T.List {T.value = xs}] -> T.Int (List.length xs) | _ -> T.Int 0)); Env.set env (Types.symbol "=") - (T.Fn (function [a; b] -> T.Bool (a = b) | _ -> T.Bool false)); + (T.Fn (function + | [T.List a; T.Vector b] -> T.Bool (a = b) + | [T.Vector a; T.List b] -> T.Bool (a = b) + | [a; b] -> T.Bool (a = b) + | _ -> T.Bool false)); Env.set env (Types.symbol "pr-str") (T.Fn (function xs -> |
