Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

scala match

val x: Int = Random.nextInt(10)

x match {
  case 0 => "zero"
  case 1 => "one"
  case 2 => "two"
  case _ => "other"
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scala #match
ADD COMMENT
Topic
Name
6+5 =