From 3ddf361d176aeef9e71314ef8c16a1ce2b5ac702 Mon Sep 17 00:00:00 2001 From: JonoCode9374 <36217120+JonoCode9374@users.noreply.github.com> Date: Thu, 26 Dec 2019 21:03:59 +1100 Subject: [PATCH] Update chainify.py --- chainify.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/chainify.py b/chainify.py index 0f79711..b1c6690 100644 --- a/chainify.py +++ b/chainify.py @@ -42,4 +42,19 @@ for exp in exprs: pattern, fns = exp if pattern == "020": - print(fns[1] + "(" + fns[0] + ",", fns[2] + ")") + print(fns[1] + "(" + fns[0] + ", " + fns[2] + ")") + + elif pattern == "02": + print(fns[1] + "(" + fns[0] + ", R)") + + elif pattern == "10": + print(fns[0] + "(" + fns[1] + ")") + + elif pattern == "11": + print(fns[0] + "(" + fns[1] + "(R))") + + elif pattern == "12": + print(fns[1] + "(" + fns[0] + ", " + "R)") + + elif pattern == "20": + print(fns[0] + "(L, " + fns[1] + ")")