scala-collections
Writing a generic 'fill' method
I am trying to write a generic fill method, and following is wha开发者_运维百科t I have come up with so far:[详细]
2023-04-03 07:19 分类:问答Why stream fold operation throws Out of memory exception?
I have following simple code def fib(i:Long,j:Long):Stream[Long] = i #:: fib(j, i+j) (0l /: fib(1,1).take(10000000)) (_+_)[详细]
2023-04-03 04:49 分类:问答How do I flatten a nested For Comprehension that uses I/O?
I am having trouble flattening a nested For Generator into a single For Generator. I created MapSerializer to save and load Maps.[详细]
2023-04-02 23:47 分类:问答Is there a Scala version of NavigableMap?
In Java 1.6, the NavigableMap (and the NavigableSet) interfaces were introduced and TreeMap was updated to implement the new interface. Among other things, NavigableMap is useful for asking questions[详细]
2023-03-31 15:05 分类:问答reduce list of integers/range of integers in scala
Total newbie question here...Today while trying to calculate sum of a list of integers(actually BitSe开发者_StackOverflow社区t), I ran into overflow scenarios and noticed that the return type of(sum/p[详细]
2023-03-31 10:29 分类:问答Lazily evaluated indexed sequence type
I need to build a sequence of objects that are loaded from an external resource. This loading being an expensive operation needs to be delayed until the time the objects are needed. After the collecti[详细]
2023-03-30 20:37 分类:问答Why don't scala collections have any human-readable methods like .append, .push, etc
Scala colle开发者_JAVA百科ctions have a bunch of readable and almost readable operators like :+ and +:, but why aren\'t there any human readable synonyms like append? All mutable collections in Scala[详细]
2023-03-30 16:23 分类:问答How to convert a SortedSet in Java to a Seq in Scala
The Jedis call I\'m using returns a Set, although at runtime it is actually a LinkedHashSet. I want to pull it into Scala, deseria开发者_如何学编程lize the elements, and return a Seq.Easy![详细]
2023-03-28 20:19 分类:问答Scala's "This" and MapLike
Say I wanted to extend Scala\'s MapLike trait with a concrete implementation, IntIntM开发者_StackOverflow社区ap. In order to do so, I need to implement the following methods,[详细]
2023-03-26 06:09 分类:问答Map<String, List<? extends T>> in Scala
In my use case I have a class with covariant type Foo[+T] and classes A <: T, B <: T, C <: T,[详细]
2023-03-26 04:49 分类:问答