aboutsummaryrefslogtreecommitdiff
path: root/miniMAL/types.json
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-02-15 17:45:04 -0600
committerJoel Martin <github@martintribe.org>2015-02-15 17:45:04 -0600
commitdc2c5b3d8f41cbae56c6fb22847d0aac5806b51f (patch)
tree3a6f481ff4ebb5b15613af480f2e83df7cb3fac0 /miniMAL/types.json
parentc5d302358e0b519f9de6d570158d07d60fda6d97 (diff)
downloadmal-dc2c5b3d8f41cbae56c6fb22847d0aac5806b51f.tar.gz
mal-dc2c5b3d8f41cbae56c6fb22847d0aac5806b51f.zip
miniMAL: add step5.
Diffstat (limited to 'miniMAL/types.json')
-rw-r--r--miniMAL/types.json36
1 files changed, 25 insertions, 11 deletions
diff --git a/miniMAL/types.json b/miniMAL/types.json
index 9e19464..2e85775 100644
--- a/miniMAL/types.json
+++ b/miniMAL/types.json
@@ -1,16 +1,5 @@
["do",
-["def", "symbol", ["fn", ["name"],
- ["hash-map", ["`", "type"], ["`", "Symbol"],
- ["`", "val"], "name"]]],
-
-["def", "symbol?", ["fn", ["obj"],
- ["if", ["=", "obj", null],
- false,
- ["if", ["=", ["`", "Symbol"], ["get", "obj", ["`", "type"]]],
- true,
- false]]]],
-
["def", "_cmp_seqs", ["fn", ["a", "b"],
["if", ["not", ["=", ["count", "a"], ["count", "b"]]],
false,
@@ -27,5 +16,30 @@
false],
["=", "a", "b"]]]],
+["def", "symbol", ["fn", ["name"],
+ ["hash-map", ["`", "type"], ["`", "Symbol"],
+ ["`", "val"], "name"]]],
+
+["def", "symbol?", ["fn", ["obj"],
+ ["if", ["=", "obj", null],
+ false,
+ ["if", ["=", ["`", "Symbol"], ["get", "obj", ["`", "type"]]],
+ true,
+ false]]]],
+
+["def", "malfunc", ["fn", ["fn", "ast", "env", "params"],
+ ["hash-map", ["`", "type"], ["`", "MalFunc"],
+ ["`", "fn"], "fn",
+ ["`", "ast"], "ast",
+ ["`", "env"], "env",
+ ["`", "params"], "params"]]],
+
+["def", "malfunc?", ["fn", ["obj"],
+ ["if", ["=", "obj", null],
+ false,
+ ["if", ["=", ["`", "MalFunc"], ["get", "obj", ["`", "type"]]],
+ true,
+ false]]]],
+
null
]