summaryrefslogblamecommitdiff
path: root/test/files/continuations-run/ifelse0.scala
blob: 2facab4b98e865f326db8ed0d91863e7ce1016c0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11





                                 
 



                                         
  



                                        
  
 
// $Id$

import scala.util.continuations._


object Test {
 
  def test(x:Int) = if (x <= 7)
    shift { k: (Int=>Int) => k(k(k(x))) }
  else
    shift { k: (Int=>Int) => k(x) }
  
  def main(args: Array[String]): Any = {
    println(reset(1 + test(7)))
    println(reset(1 + test(8)))
  }
  
}