Top "Scala-collections" questions

Collection library for Scala Programming Language

Scala Nil equivalent for Set

Is there an equivalent of Nil for Set in scala? I tried using Nil as a value for Set, but …

scala scala-collections
Cleaner tuple groupBy

I have a sequence of key-value pairs (String, Int), and I want to group them by key into a sequence …

scala scala-collections
Scala create List[Int]

How can I quickly create a List[Int] that has 1 to 100 in it? I tried List(0 to 100), but it returns …

scala scala-collections
Can I use scala List directly in Java?

Can I use scala List in Java, like : import scala.collection.immutable.List; class HelloScalaList { public static void main (String[] …

java scala-collections scala-java-interop
Scala: "map" vs "foreach" - is there any reason to use "foreach" in practice?

In Scala collections, if one wants to iterate over a collection (without returning results, i.e. doing a side effect …

scala foreach scala-collections side-effects
What type to use to store an in-memory mutable data table in Scala?

Each time a function is called, if it's result for a given set of argument values is not yet memoized …

scala data-structures memoization scala-collections
Play Framework REST with basic authentication and SSL

I am new to this authentication area. I searched a lot but was not able to find a way to …

scala playframework playframework-2.0 scala-collections typesafe-activator
Scala collection standard practice

Coming from a Java background, I'm used to the common practice of dealing with collections: obviously there would be exceptions …

java scala scala-collections
Using collect on maps in Scala

I recently stumbled over this post, which "introduces" the collect method for Scala collections. The usage is straight forward: scala&…

scala compiler-construction jvm scala-collections type-erasure
What is the difference between Seq and IndexedSeq/LinearSeq in Scala?

In Scala Collection documentation, there is some clue to this question: Trait Seq has two subtraits LinearSeq, and IndexedSeq. These …

scala scala-collections seq