Top "Scala-collections" questions

Collection library for Scala Programming Language

Scala 2.8 breakOut

In Scala 2.8, there is an object in scala.collection.package.scala: def breakOut[From, T, To](implicit b : CanBuildFrom[Nothing, …

scala scala-2.8 scala-collections
What does param: _* mean in Scala?

Being new to Scala (2.9.1), I have a List[Event] and would like to copy it into a Queue[Event], but …

scala syntax scala-collections
How to implement Map with default operation in Scala

class DefaultListMap[A, B <: List[B]] extends HashMap[A, B] { override def default(key: A) = List[B]() } I wan't …

scala scala-collections
Scala: how to merge a collection of Maps

I have a List of Map[String, Double], and I'd like to merge their contents into a single Map[String, …

scala map folding scala-collections
Get first n elements from List

I have a List val family=List("1","2","11","12","21","22","31","33","41","44","51","55") i want to take its first n elements but the problem is that …

list scala collections scala-collections
Which scala mutable list to use?

This is a followup question to No Scala mutable list I want to use a mutable list in Scala. I …

scala scala-collections
Elegant way to invert a map in Scala

Learning Scala currently and needed to invert a Map to do some inverted value->key lookups. I was looking …

scala scala-collections
Scala foldLeft on Maps

How do you use Map.foldLeft? According to the docs it looks like foldLeft [B] (z: B)(op: (B, (A, …

scala scala-2.8 scala-collections
How does Scala's mutable Map update [map(key) = newValue] syntax work?

I'm working through Cay Horstmann's Scala for the Impatient book where I came across this way of updating a mutable …

scala scala-collections
How to transform Scala collection of Option[X] to collection of X

I'm starting to explore Scala, and one of the things I'm intrigued by is the Option type and the promise …

scala scala-collections scala-option