Skip to content

Commit

Permalink
Fix pair apply
Browse files Browse the repository at this point in the history
  • Loading branch information
nayakrujul committed Jul 13, 2023
1 parent 6dbec5b commit 62b352c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 2 deletions.
Binary file modified src/__pycache__/test_run.cpython-39.pyc
Binary file not shown.
Binary file modified src/thunno2/__pycache__/interpreter.cpython-39.pyc
Binary file not shown.
Binary file modified src/thunno2/__pycache__/tests.cpython-39.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/thunno2/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,10 @@ def run(code, *, context=None, iteration_index=None):
if k:
r.append(k[-1])
ctx.stack = Stack(copy.deepcopy(old_stack))
ctx.stack.push(a)
k = f2()
if k:
r.append(k[-1])
ctx.stack = Stack(copy.deepcopy(old_stack))
ctx.stack.push(r)
elif desc == "recursive environment":
a = next(ctx.stack.rmv(1))
Expand Down
1 change: 0 additions & 1 deletion src/thunno2/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def assert_eq(a, *b):
assert_eq(call("A", ["a", ["b", ["1", ["2"]]]]), [1, [1, [0, [0]]]])

assert_eq(call("A", ["abc", 123, "123", -0.123]), [1, 123, 0, 0.123])
assert_eq(call("A"), 0)

# B

Expand Down

0 comments on commit 62b352c

Please sign in to comment.