Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.util.continuations._
- def test1 = reset {
- print("1")
- }
- > wypisze 1
- def test2 = reset {
- print("1")
- shift { cont: (Unit => Unit) =>
- print("2")
- }
- print("3")
- }
- > wypisze 12
- def test3 = reset {
- print("1")
- shift { cont: (Unit => Unit) =>
- print("2")
- cont()
- }
- print("3")
- }
- > wypisze 132
Add Comment
Please, Sign In to add comment