1
0
Fork 0
mirror of https://github.com/Lyxal/Keta.git synced 2024-08-14 23:53:13 +00:00

Update chainify.py

This commit is contained in:
JonoCode9374 2019-12-26 21:00:09 +11:00 committed by GitHub
parent 15a2665023
commit 147c611fef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ patterns = ["020", "021", "022", "02", "10", "11", "12", "20", "21", "22",
pattern = ""
while len(arities):
if pattern in patterns and pattern + str(arities[-1][0]) not in patterns:
exprs += [pattern, expr]
exprs.append([pattern, expr])
expr = []
pattern = ""
@ -31,8 +31,15 @@ while len(arities):
arities.pop()
if expr and pattern in patterns:
exprs += [pattern, expr]
exprs.append([pattern, expr])
expr = []
pattern = ""
print(exprs)
for exp in exprs:
pattern, fns = exp
if pattern == "020":
print(fns[1] + "(" + fns[0] + ",", fns[2] + ")")