scala-2.8
Use cases of Scala collection forwarders and proxies
Scala\'s collection library contains the forwarders IterableForwarder, TraversableForwarder, SeqForwarder and proxies like IterableProxy, MapProxy, SeqProxy, SetProxy, TraversableProxy, etc. Forwarder[详细]
2023-02-27 05:12 分类:问答Scala class with Publisher and Subscriber traits
Using import scala.collection.mutable.{Publisher, Subscriber} I\'m trying to implement a cla开发者_高级运维ss that subscribes to events and publishes events. For example, this class may receive raw da[详细]
2023-02-26 23:52 分类:问答How can two coupled Scala generic type constructors refer to each other as type parameters?
In Java 1.6.0_21, the first example below compiles fine, and I think that\'s because the parameter type bounds are bare.That is, in the \"Z extends Zen\" bound below, Java allows[详细]
2023-02-22 13:47 分类:问答How to find a matching element in a list and map it in as an Scala API method?
Is there a method to do the following without doing both methods: find 开发者_如何学编程and map?[详细]
2023-02-20 10:41 分类:问答Scala program exiting before the execution and completion of all Scala Actor messages being sent. How to stop this?
I am sending my Scala Ac开发者_运维问答tor its messages from a for loop. The scala actor is receiving the[详细]
2023-02-16 02:59 分类:问答How to define anything that extends this trait
Refer to the following code snippet: trait Fruit { val color:String def == (fruit:Fruit) = this.color == fruit.color[详细]
2023-02-15 20:05 分类:问答Scala implicit ClassManifest[T] is null in Array.fill(..)
I started messing around with generics in Scala, and it is a tough cookie to break. My idea is to learn it by writing a generic matrix class for use in my parallel computing project.[详细]
2023-02-15 08:34 分类:问答Difference between matching String and Int in Scala
Consider the following two fragments of code: scala> def f1(x:Any) = x match { case i:String => i; case _ => null }[详细]
2023-02-13 15:50 分类:问答Scala parameterized type problem with returning an instance of the same type
In the following, I will present only very reduced versions of my Scala code. Just enough to show the problem. Unnecessary blocks of code will be reduced to ....[详细]
2023-02-13 05:56 分类:问答Scala: function/method application and tuples
I stumbled across a pretty interesting behavior in Scala. scala> def foo(t: (Int, Int, Int)): Int = t._1[详细]
2023-02-13 05:18 分类:问答