aboutsummaryrefslogtreecommitdiff
path: root/miniMAL/types.json
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-02-15 16:34:55 -0600
committerJoel Martin <github@martintribe.org>2015-02-15 16:34:55 -0600
commitc5d302358e0b519f9de6d570158d07d60fda6d97 (patch)
tree4705f31f4485a1b9501a08dac5728beef08a352c /miniMAL/types.json
parent7ebf5219e1be21ed10cecabda8262c77da7465ae (diff)
downloadmal-c5d302358e0b519f9de6d570158d07d60fda6d97.tar.gz
mal-c5d302358e0b519f9de6d570158d07d60fda6d97.zip
miniMAL: step4.
Diffstat (limited to 'miniMAL/types.json')
-rw-r--r--miniMAL/types.json16
1 files changed, 16 insertions, 0 deletions
diff --git a/miniMAL/types.json b/miniMAL/types.json
index 37cc50e..9e19464 100644
--- a/miniMAL/types.json
+++ b/miniMAL/types.json
@@ -11,5 +11,21 @@
true,
false]]]],
+["def", "_cmp_seqs", ["fn", ["a", "b"],
+ ["if", ["not", ["=", ["count", "a"], ["count", "b"]]],
+ false,
+ ["if", ["empty?", "a"],
+ true,
+ ["if", ["equal?", ["get", "a", 0], ["get", "b", 0]],
+ ["_cmp_seqs", ["rest", "a"], ["rest", "b"]],
+ false]]]]],
+
+["def", "equal?", ["fn", ["a", "b"],
+ ["if", ["list?", "a"],
+ ["if", ["list?", "b"],
+ ["_cmp_seqs", "a", "b"],
+ false],
+ ["=", "a", "b"]]]],
+
null
]