Skip to content

Instantly share code, notes, and snippets.

View mame's full-sized avatar

Yusuke Endoh mame

View GitHub Profile
// 失敗版
sig Coin {}
abstract sig State {
  candidates : set Coin,
}
sig Branch extends State {
  left, right : set Coin, 
  eq, lt, gt : State
M1 k1 = (call/cc (M2 k1)) + 3
M2 k1 k2 = if b then (k1 1) else (k2 2)
(call/cc M1) + 4
S1 k1 = (shift (λk2. k2 (S2 k1 k2))) + 3
S2 k1 k2 = if b then (k1 1) else (k2 2)
reset(exit(shift (λk1. k1 (S1 k1)) + 4))