File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import control.ControlException
1212 *      The `Break` exception class extends `ControlException` which is a regular 
1313 *      `RuntimeException`, optimized so that stack trace generation is suppressed. 
1414 *    - Better performance: breaks to enclosing scopes in the same method can 
15-  *      be rwritten  to jumps. 
15+  *      be rewritten  to jumps. 
1616 */  
1717object  boundary : 
1818
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ object Test {
1111  def  takeUntil (xs : List [Int ], elem : Int ) = 
1212    boundary :
1313      var  buf  =  new  ListBuffer [Int ]
14-       for  x <-  xs yield 
14+       for  x <-  xs do 
1515        if  x ==  elem then  break(buf.toList)
1616        buf +=  x
17-         x 
17+       xs 
1818
1919  trait  Animal 
2020  object  Dog  extends  Animal 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments