mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 21:57:38 +03:00
ocaml: allow keyword argument for keyword core function
This commit is contained in:
parent
e1b778481c
commit
022e4f0b51
@ -152,7 +152,10 @@ let init env = begin
|
|||||||
Env.set env (Types.symbol "symbol?")
|
Env.set env (Types.symbol "symbol?")
|
||||||
(Types.fn (function [T.Symbol _] -> T.Bool true | _ -> T.Bool false));
|
(Types.fn (function [T.Symbol _] -> T.Bool true | _ -> T.Bool false));
|
||||||
Env.set env (Types.symbol "keyword")
|
Env.set env (Types.symbol "keyword")
|
||||||
(Types.fn (function [T.String x] -> T.Keyword x | _ -> T.Nil));
|
(Types.fn (function
|
||||||
|
| [T.String x] -> T.Keyword x
|
||||||
|
| [T.Keyword x] -> T.Keyword x
|
||||||
|
| _ -> T.Nil));
|
||||||
Env.set env (Types.symbol "keyword?")
|
Env.set env (Types.symbol "keyword?")
|
||||||
(Types.fn (function [T.Keyword _] -> T.Bool true | _ -> T.Bool false));
|
(Types.fn (function [T.Keyword _] -> T.Bool true | _ -> T.Bool false));
|
||||||
Env.set env (Types.symbol "number?")
|
Env.set env (Types.symbol "number?")
|
||||||
|
Loading…
Reference in New Issue
Block a user