summaryrefslogblamecommitdiff
path: root/test/files/continuations-run/basics.scala
blob: 07b3de519432ee02f69a748a9d93c7fa59aadea4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                        
                                 
 

                        
 
   
 
 
// $Id$

import scala.util.continuations._


object Test {

  def m0() = {
    shift((k:Int => Int) => k(k(7))) * 2
  }

  def m1() = {
    2 * shift((k:Int => Int) => k(k(7)))
  }

  def main(args: Array[String]) {

    println(reset(m0()))
    println(reset(m1()))

  }

}