scala-collections
When should I choose Vector in Scala?
It seems that Vector was late t开发者_运维知识库o the Scala collections party, and all the influential blog posts had already left.[详细]
2023-03-26 03:08 分类:问答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 something like a FIFO queue, but that has an upper-limit on its size such that when the li[详细]
2023-03-25 15:58 分类:问答Function to check if a list has no gaps
I just want a function that returns true if all the elements of a List[Integer] follow each other, i.e.[详细]
2023-03-24 18:08 分类:问答observablemap in scala
I am new to scala. I want to be notified whenever a map is modified. I thought this can be done using a observable map.[详细]
2023-03-23 20:47 分类:问答scala pattern matching on scala.collection.script.Message
I am trying to cre开发者_高级运维ate a subscriber on a map. here is the code: type Msg = Message[(SomeObject)] with undoable[详细]
2023-03-23 18:31 分类:问答Enriching Scala collections with a method
How do I add a foreachWithIndex method on Scala collections? This is what I could come up with so fa开发者_JAVA技巧r:[详细]
2023-03-23 08:32 分类:问答Restriction on Range
i开发者_运维问答\'m surprised. Why was made restriction of implementation to type Range, is whose the size limited by Int.MaxValue?[详细]
2023-03-22 23:40 分类:问答Scala: read and save all elements of an Iterable
I have an Iterable[T] that is really a stream of unknown length, and want to read it all and save it into something that is still an instance of Iterable. I really do have to read it and save it; I ca[详细]
2023-03-22 15:22 分类:问答How to group a variable-length, repeating sequence in Scala
I have a collection of ints that repeat themselves in a pattern: val repeatingSequence = List(1,2,3,1,2,3,4,1,2,1,2,3,4,5)[详细]
2023-03-22 05:20 分类:问答Selecting keys of a TreeMap by their index
Imagine you have the following TreeMap: var dates = new TreeMap[Long, Tuple2[Int, Double]]() I know I can loop through it with:[详细]
2023-03-21 20:12 分类:问答