Top "Scala-collections" questions

Collection library for Scala Programming Language

remove first and last Element from scala.collection.immutable.Iterable[String]

I am trying to convert my way of getting values from Form, but stuck some where val os= for { m &…

scala collections scala-collections
How to convert a Seq[A] to a Map[Int, A] using a value of A as the key in the map?

I have a Seq containing objects of a class that looks like this: class A (val key: Int, ...) Now I …

scala scala-2.8 scala-collections
how to remove key value from map in scala

Map(data -> "sumi", rel -> 2, privacy -> 0, status -> 1,name->"govind singh") how to …

scala dictionary collections playframework scala-collections
What is the difference between JavaConverters and JavaConversions in Scala?

In scala.collection, there are two very similar objects JavaConversions and JavaConverters. What is the difference between these two objects? …

scala scala-collections scala-java-interop
What is the fastest way to sum a collection in Scala

I've tried different collections in Scala to sum it's elements and they are much slower than Java sums it's arrays (…

scala scala-collections
Convert Java Map to Scala Map

I have a java map: java.util.Map<SomeObject, java.util.Collection<OtherObject>> and I would …

java scala type-conversion scala-collections scala-java-interop
Difference between mapValues and transform in Map

In Scala Map (see API) what is the difference in semantics and performance between mapValues and transform ? For any given …

scala dictionary scala-collections
Scala convert Iterable or collection.Seq to collection.immutable.Seq

It appears the toSeq method in Scala collections returns a scala.collection.Seq, I could also return a Traversable or …

scala scala-collections
How do I convert an Array[String] to a Set[String]?

I have an array of strings. What's the best way to turn it into an immutable set of strings? I …

scala scala-collections
How to get the element index when mapping an array in Scala?

Let's consider a simple mapping example: val a = Array("One", "Two", "Three") val b = a.map(s => myFn(s)) …

arrays scala map scala-collections