Top "Scala-collections" questions

Collection library for Scala Programming Language

Is there such a thing as bidirectional maps in Scala?

I'd like to link 2 columns of unique identifiers and be able to get a first column value by a second …

scala collections map scala-collections bidirectional-relation
scala parallel collections degree of parallelism

Is there any equivalent in scala parallel collections to LINQ's withDegreeOfParallelism which sets the number of threads which will run …

scala scala-collections
Summing up two options

Let's say I have two optional Ints (both can be Some or None): val one : Option[Int] = Some(1) val two : …

scala option scala-collections
Why don't Scala Lists have an Ordering?

Is there a reason why there is no implicit Ordering for Lists in Scala? val lists = List(List(2, 3, 1), List(2, 1, 3)) lists.…

scala scala-collections
Why is Scala's immutable Set not covariant in its type?

EDIT: Re-written this question based on original answer The scala.collection.immutable.Set class is not covariant in its type …

scala set covariance scala-collections
Idiomatic Scala Map upsert

I'm working with a map in Scala and doing the usual "if there's no value associated with a key, create …

scala scala-collections
Why does Scala's toSeq convert an immutable Set to a mutable ArrayBuffer?

If I call toSeq on an immutable Set collection I get an ArrayBuffer. scala> Set(1,2,3).toSeq // returns Seq[Int] = …

scala set sequence immutability scala-collections
Scala method to combine each element of an iterable with each element of another?

If I have this: val a = Array("a ","b ","c ") val b = Array("x","y") I would like to know …

scala scala-collections cartesian-product
Maximum Length for scala queue

I'm curious if Scala has some gem hidden in its collection classes that I can use. Basically I'm looking for …

scala scala-collections