Skip to content

Instantly share code, notes, and snippets.

@taku0
Created March 14, 2016 14:54
Show Gist options
  • Save taku0/b3dd6298420202aa8b04 to your computer and use it in GitHub Desktop.
Save taku0/b3dd6298420202aa8b04 to your computer and use it in GitHub Desktop.
M1 k1 = (call/cc (M2 k1)) + 3
M2 k1 k2 = if b then (k1 1) else (k2 2)
(call/cc M1) + 4
S1 = shift(λk1. k1(reset(k1((S2 k1) + 3))))
S2 k1 = shift(λk2. k2(if b then (k1 1) else (k2 2)))
reset(exit(S1 + 4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment