aboutsummaryrefslogtreecommitdiff
path: root/miniMAL/miniMAL-core.json
diff options
context:
space:
mode:
Diffstat (limited to 'miniMAL/miniMAL-core.json')
-rw-r--r--miniMAL/miniMAL-core.json10
1 files changed, 10 insertions, 0 deletions
diff --git a/miniMAL/miniMAL-core.json b/miniMAL/miniMAL-core.json
index a4acfec..d870604 100644
--- a/miniMAL/miniMAL-core.json
+++ b/miniMAL/miniMAL-core.json
@@ -77,6 +77,16 @@
["def", "apply", ["fn", ["a", "b"], [".", "a", ["`", "apply"], "a", "b"]]],
+["def", "or", ["~", ["fn", ["&", "xs"],
+ ["if", ["empty?", "xs"],
+ null,
+ ["if", ["=", 1, ["count", "xs"]],
+ ["first", "xs"],
+ ["list", ["`", "let"], ["list", ["`", "or_FIXME"], ["first", "xs"]],
+ ["list", ["`", "if"], ["`", "or_FIXME"],
+ ["`", "or_FIXME"],
+ ["concat", ["`", ["or"]], ["rest", "xs"]]]]]]]]],
+
["def", "typeof", ["fn", ["a"], ["js", ["str", ["`", "typeof "], ["pr-str", "a"]]]]],
["def", "repl", ["fn",["prompt", "rep"],