Created
January 13, 2015 03:54
-
-
Save ryoppy/2119aad67563153bf225 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> val size = "300x250" | |
size: String = 300x250 | |
scala> val Array(w, h) = size split "x" map (_.toInt) | |
w: Int = 300 | |
h: Int = 250 | |
scala> val Array(w, h, z) = size split "x" map (_.toInt) | |
scala.MatchError: [I@606d6d2c (of class [I) | |
... 33 elided | |
scala> val Array(w) = size split "x" map (_.toInt) | |
scala.MatchError: [I@365e65bb (of class [I) | |
... 33 elided |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment