scala-collections
just another canBuildFrom question
I\'m going throught collection api and the returned type of operations which can modify the type of conta开发者_开发知识库iner and the type of contained element have all the header in its non-usecase[详细]
2023-02-08 00:04 分类:问答Extending Scala collections
I would like to derive a version of a Scala built-in collection that expands on the functionality for a particular generic type e.g.,[详细]
2023-02-07 05:22 分类:问答Why is filter in front of foldLeft slow in Scala?
I wrote an answer to the first Project Euler question: Add all the natural numbers below one thousand that are multiples of 3 or 5.[详细]
2023-02-06 11:34 分类:问答How to add unzipWithIndex to all Scala collections where it makes sense
Suppose I have a list of strings and I use zipWithIndex to transform it to a list of tuples: List(\"a\", \"b\", \"c\").zipWithIndex[详细]
2023-02-05 21:47 分类:问答create a Map from scala.xml.NodeSeq
I have the following xml-node: val xml = <fields><field name=\"one\"></field><field name=\"two\"></field></fields>[详细]
2023-02-04 22:05 分类:问答Fill List with values from a for loop in Scala
I\'m pretty new to scala and I am not able to solve this (pretty) 开发者_C百科trivial problem. I know I can instantiate a List with predefined values like this:[详细]
2023-02-04 08:20 分类:问答Return a Java collection of type and subclasses from Scala
I have an interface in Java that looks something like this: public interface X<T> { Set<Class<? extends T>> getTypes();[详细]
2023-02-03 15:23 分类:问答Adding two Set[Any]
Adding two Set[Int] works: Welcome to Scala version 2.8.1.final (Java HotSpot(TM) Server VM, Java 1.6.0_23).[详细]
2023-02-03 03:04 分类:问答What is the prefered way in using the parallel collections in Scala?
At first I assumed that every collection class would receive an additional par method which would convert the collection to a fitting parallel data structure (like map returns the best collection for[详细]
2023-01-31 19:03 分类:问答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))[详细]
2023-01-31 17:39 分类:问答