Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val n = reset {
println("A")
val num = shift { (cont: Int => Int) =>
println("B")
cont(cont(1))
}
println("num", num)
num * 2
}
println("n", n)
/* Outputs */
// A
// B
// (num,1)
// (num,2)
// (n,4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.