diff options
| author | Joel Martin <github@martintribe.org> | 2015-02-15 16:34:55 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-02-15 16:34:55 -0600 |
| commit | c5d302358e0b519f9de6d570158d07d60fda6d97 (patch) | |
| tree | 4705f31f4485a1b9501a08dac5728beef08a352c /miniMAL/types.json | |
| parent | 7ebf5219e1be21ed10cecabda8262c77da7465ae (diff) | |
| download | mal-c5d302358e0b519f9de6d570158d07d60fda6d97.tar.gz mal-c5d302358e0b519f9de6d570158d07d60fda6d97.zip | |
miniMAL: step4.
Diffstat (limited to 'miniMAL/types.json')
| -rw-r--r-- | miniMAL/types.json | 16 |
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 ] |
