Skip to content

Instantly share code, notes, and snippets.

@lihaoyi
Created April 21, 2013 17:19
Show Gist options
  • Save lihaoyi/5430318 to your computer and use it in GitHub Desktop.
Save lihaoyi/5430318 to your computer and use it in GitHub Desktop.
var x
println("reset{} " +
reset{
shift{ cont: (Int => Int) =>
println("cont(1): " + cont(1))
println("cont(2): " + cont(2))
5
}
)
10
}
)
(pp
(call/cc
(lambda (cont)
(pp (cont 1))
(pp (cont 2))
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment