Collection library for Scala Programming Language
For a Scala List[Int] I can call the method max to find the maximum element value. How can I …
scala indexing max scala-collectionsWhilst working through the Scala exercises on Iterables, I encountered the following strange behaviour: val xs = Set(5,4,3,2,1) val ys = Set(1,2,3,4,5) …
scala scala-collectionsI'm using some Scala library from my Java code. And I have a problem with collections. I need to pass …
java scala scala-collectionsIn Scala there is a Stream class that is very much like an iterator. The topic Difference between Iterator and …
scala stream scala-collectionsHow would you sort a scala.collection.Map[java.lang.String, Int] by its values (so on the Int)? What …
sorting scala scala-collectionsI have a Scala function f(s1: String, s2: String): Map[String,String] I want to allow a colleague coding …
scala scala-collections scala-java-interopWhat is the difference between Scala's MutableList and ListBuffer classes in scala.collection.mutable? When would you use one vs …
scala scala-collectionsWhat is the idiomatic way of a getOrElseUpdate for immutable.Map instances?. I use the snippet below, but it seems …
scala scala-collectionsA Java API returns a java.util.Map<java.lang.String,java.lang.Boolean>;. I would like to …
scala map scala-collections language-interoperabilityFor any given set, for instance, val fruits = Set("apple", "grape", "pear", "banana") how to get a random element from …
scala random collections set scala-collections