I am trying to implement something that is effectively an enumeration in Scala. I would like to do that using case classes so that the compiler is able to detect any non-exhaustive pattern matches.
A following C code uses enum and array as efficient \"map\" from enum to anything: enum Color { ColorRed, ColorGreen, ColorBlue, ColorSize};
I am playing with this example http://scala.sygneca.com/code/remoteactors to learn how remote actors work in Scala (2.8.0). In particular I slightly modified how the messages send by the actors are de
Say I have got following two case classes: case class Address(street: String, city: String, state: String, zipCode: Int)
Is it possible to implement a bi-directional tree in a case class.This seems like it should be easy, but I\'m getting stumped
I want create a special calculator. I think that case class is a good idea for operations: sealed class Expr
I have this inheritance sealed abstract class MyValue case class MyString(s:String) extends MyValue case class MyBoolean(b:Boolean) extends MyValue
Im trying to create a parser for a small language with commands including labels and goto: ... lazy val cmds= opt(\"{\")~>rep(cmd<~opt(\";\"))<~opt(\"}\") ^^ {...}
I have this case class define: class Protocol(protocol:String) object Protocol { def apply(protocol:String) :Protocol = {
When you create a case class, the compiler creates a corresponding companion object with a few of the case class goodies: an apply factory method matching the primary constructor, equals, hashCode, an