Show
Ignore:
Timestamp:
02/14/08 18:51:44 (6 years ago)
Author:
keisuken
Message:

Loop object update. Range sample add.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/scala/sandbox/src/jp/ne/cappuccino/keisuken/scl/lang/Loop.scala

    r6676 r6677  
    5050    println(result) 
    5151 
    52     find[String, String](Array("aaa", "bbb", "ccc")) {(value, break) => 
     52    find[String,String](Array("aaa", "bbb", "ccc")) {(value, break) => 
    5353      if(value.equals("bbb")) 
    5454        break(value) 
     
    5757      case None => println("Not found") 
    5858    } 
     59 
     60    find[Int,Int](1 to 10) {(i, break) => 
     61      if(i % 2 == 1) break(i) 
     62    } match { 
     63      case Some(result) => println(result) 
     64      case None => println("Not found") 
     65    } 
    5966  } 
    6067}