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
12
12
* The `Break` exception class extends `ControlException` which is a regular
13
13
* `RuntimeException`, optimized so that stack trace generation is suppressed.
14
14
* - Better performance: breaks to enclosing scopes in the same method can
15
- * be rwritten to jumps.
15
+ * be rewritten to jumps.
16
16
*/
17
17
object boundary :
18
18
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ object Test {
11
11
def takeUntil (xs : List [Int ], elem : Int ) =
12
12
boundary :
13
13
var buf = new ListBuffer [Int ]
14
- for x <- xs yield
14
+ for x <- xs do
15
15
if x == elem then break(buf.toList)
16
16
buf += x
17
- x
17
+ xs
18
18
19
19
trait Animal
20
20
object Dog extends Animal
You can’t perform that action at this time.
0 commit comments