Created
January 31, 2014 21:28
-
-
Save milessabin/8743568 to your computer and use it in GitHub Desktop.
Is breakOut just an optimization?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import scala.collection._ | |
import scala.collection._ | |
scala> val l1: List[Int] = Set(1, 2, 3, 4).map(_/2).toList | |
l1: List[Int] = List(0, 1, 2) | |
scala> val l1: List[Int] = Set(1, 2, 3, 4).map(_/2)(breakOut) | |
l1: List[Int] = List(0, 1, 1, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment