gets the new functionality, and all other code is unaffected. The following example shows the enrichment of type Int with methods isEven and isOdd: object MyExtensions { implicit class IntPredicates(i: Int) { def isEven = i % 2 == 0 def isOdd = !isEven } } import MyExtensions._ // bring implicit enrichment into scope 4.isEven // -> true Importing the members of MyExtensions brings the implicit conversion to extension class IntPredicates into scope. Concurrency Scala's standard library includes support for futures and promises, in addition to the standard Java concurrency APIs. Originally, it also included support for the actor model, which is now available as a separate source-available platform Akka licensed by Lightbend Inc. Akka actors may be distributed or combined with software transactional memory (transactors). Alternative communicating sequential processes (CSP) implementations for channel-based message passing are Communicating Scala Objects, or simply via JCSP. An Actor is like a thread instance with a mailbox. It can be created by system.actorOf, overriding the receive method to receive messages and using the ! (exclamation point) method to send a message. The following example shows an EchoServer that can receive messages and then print them. val echoServer = actor(new Act { become { case msg => println("echo " + msg) } }) echoServer ! "hi" Scala also comes with built-in support for data-parallel programming in the form of Parallel Collections integrated into its Standard Library since version 2.9.0. The following example shows how to use Parallel Collections to improve performance. val urls = List("https://scala-lang.org", "https://github.com/scala/scala") def fromURL(url: String) = scala.io.Source.fromURL(url) .getLines().mkString("\n") val t = System.currentTimeMillis() urls.par.map(fromURL(_)) // par returns parallel implementation of a collection println("time: " + (System.currentTimeMillis - t) + "ms") Besides futures and promises, actor support, and data parallelism, Scala also supports asynchronous programming with software transactional memory, and event streams. Cluster computing The most well-known open-source cluster-computing solution written in Scala is Apache Spark. Additionally, Apache Kafka, the publish–subscribe message queue popular with Spark and other stream processing technologies, is written in Scala. Testing There are several ways to test code in Scala. ScalaTest supports multiple testing styles and can integrate with Java-based testing frameworks. ScalaCheck is a library similar to Haskell's QuickCheck. specs2 is a library for writing executable software specifications. ScalaMock provides support for testing high-order and curried functions. JUnit and TestNG are popular testing frameworks written in Java. Versions Comparison with other JVM languages Scala is often