Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Inconsistency: shift/reset delimited continuation #337

Open
nineties opened this issue Jun 15, 2015 · 1 comment
Open

[BUG] Inconsistency: shift/reset delimited continuation #337

nineties opened this issue Jun 15, 2015 · 1 comment

Comments

@nineties
Copy link
Owner

amber:1> reset {
amber:1~        s := 0
amber:1~        for i in 1..3
amber:1~                s += (shift c -> c)
amber:1~        s
amber:1~ }
=> <#Function(Cont)>
amber:2> $(1)
=> <#Function(Cont)>
amber:3> $(2)
=> <#Function(Cont)>
amber:4> $(3)
=> 6
amber:5> $1(1)(2)(3)
=> 3
@nineties
Copy link
Owner Author

Following experiment shows that return values of shift ... are 1 all the time in line 5.
Calculation of base-pointer might be wrong.

amber:1> reset {
amber:1~        s := 0
amber:1~        for i in 1..3
amber:1~                s += (shift c -> c)
amber:1~        s
amber:1~ }
=> <#Function(Cont)>
amber:2> $(1)
=> <#Function(Cont)>
amber:3> $(3)
=> <#Function(Cont)>
amber:4> $(5)
=> 9
amber:5> $1(1)(3)(5)
=> 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant