Scala parallel map example: Using a parallel map to transform a collection of String to all-uppercase

Using a parallel map to transform a collection of String to all-uppercase

scala> val lastNames = List("Smith","Jones","Frankenstein","Bach","Jackson","Rodin").par
lastNames: scala.collection.parallel.immutable.ParSeq[String] 
       = ParVector(Smith, Jones, Frankenstein, Bach, Jackson, Rodin)

scala> lastNames.map(_.toUpperCase)
res0: scala.collection.parallel.immutable.ParSeq[String] 
       = ParVector(SMITH, JONES, FRANKENSTEIN, BACH, JACKSON, RODIN)

See the URL for more information.