From 85f95f369cae5a75a6b44b97ea83b686995fb5e8 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 2 Mar 2015 13:41:27 -0600 Subject: ocaml: fix empty? on vectors. --- ocaml/core.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml/core.ml b/ocaml/core.ml index 20f68b6..12bf3c3 100644 --- a/ocaml/core.ml +++ b/ocaml/core.ml @@ -64,7 +64,10 @@ let init env = begin Env.set env (Types.symbol "vector?") (Types.fn (function [T.Vector _] -> T.Bool true | _ -> T.Bool false)); Env.set env (Types.symbol "empty?") - (Types.fn (function [T.List {T.value = []}] -> T.Bool true | _ -> T.Bool false)); + (Types.fn (function + | [T.List {T.value = []}] -> T.Bool true + | [T.Vector {T.value = []}] -> T.Bool true + | _ -> T.Bool false)); Env.set env (Types.symbol "count") (Types.fn (function | [T.List {T.value = xs}] -- cgit v1.2.3