From 97cd81dc43382709d844aa91bf94929406a9d729 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Thu, 9 Mar 2023 22:13:34 -0500 Subject: [PATCH] Add some more stuff to the example file --- example.json | 70 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/example.json b/example.json index 8614940..50e2819 100644 --- a/example.json +++ b/example.json @@ -1,15 +1,69 @@ [ - "fibb_helper", + "ident", + { "x": "x" }, + + "k", + {"o": {"_": "o"} }, + + "true", + { "a": { "b": ["a", []] } }, + + "false", + { "a": { "b": ["b", []] } }, + + "eq0", + { "0": "true", "_": "false" }, + + "sub", { - "a": {"b": { - "0": "a", - "1": "b", - "S S n": ["fibb_helper", ["+", "a", "b"], ["+", ["+", "a", "b"], "b"], "n"] - }} + "0": "ident", + "S n": { + "0": ["S", "n"], + "S m": ["sub", "n", "m"] + } }, + "pred", + { + "0": 0, + "S n": "n" + }, + + "lt", + { + "0": {"0": "false", "S _": "true"}, + "S n": { + "0": "false", + "S m": ["lt", "n", "m"] + } + }, + + "modulo", + {"n": {"m": + ["lt", "n", "m", + {"_": "n"}, + {"_": ["modulo", ["sub", "n", "m"], "m"]}] + }}, + + "compose", + {"f1": {"f2": {"a": + ["f1", ["f2", "a"]] + }}}, + "fibb", - ["fibb_helper", 0, 1], + [ + "fibb_helper", + { + "a": {"b": { + "0": "a", + "1": "b", + "S S n": ["fibb_helper", ["+", "a", "b"], ["+", ["+", "a", "b"], "b"], "n"] + }} + }, + "fibb_helper", + 0, + 1 + ], [] -] +] \ No newline at end of file