scala-2.8
How can I make custom toString for Array?
I want to be able to write: 开发者_Go百科 val a = Array(1,2,3) println(a.toString) And have a meaningfull printout. Is it possible?You have to do this:[详细]
2023-02-12 08:58 分类:问答How can I convert immutable.Map to mutable.Map in Scala?
How can I convert imm开发者_Go百科utable.Map to mutable.Map in Scala so I can update the values in Map?The cleanest way would be to use the mutable.Map varargs factory.Unlike the ++ approach, this use[详细]
2023-02-12 02:39 分类:问答How to choose a random element from an array in Scala?
For example, there is a Scala array val A = Array(\"please\", \"help\", \"me\"). How to choose a random element from this arra开发者_运维技巧y?import scala.util.Random[详细]
2023-02-11 22:05 分类:问答How to store the file as an array in scala?
I am trying to make a code that reads the lines in file and then store it as an array in scala? The following is the code I wr开发者_Python百科ote:[详细]
2023-02-11 21:59 分类:问答Can you call an object method dynamically off class parameterization in Scala?
I\'m quite new to Scala, 开发者_运维问答but I\'m trying to implement the following situation.Suppose I have a trait:[详细]
2023-02-11 00:25 分类:问答Is this Scala code correct?
Why does this code crash the Scala 2.8.1 compiler? val a = new Array[{ var x = 1 }](3) Is it a compiler bug?[详细]
2023-02-10 14:07 分类:问答Manifest vs ClassManifest. What does this Scala error mean?
What does this error mean? scala> val a = Array[{ def x: Int }](new { def x = 3 }) <console>:5: error: type mismatch;[详细]
2023-02-10 14:03 分类:问答Can I make "public val" but "private var" in Scala in one line?
I.e. Is it possible to make a var that is not assig开发者_Python百科nable from outside of the class ?Right now, no, there\'s no way to do that.[详细]
2023-02-10 12:08 分类:问答error message with scala installation
I would like to install scala 2.8.1. I used exactly all the steps from http://www.scala-lang.org/node/310 but when i write \'scala\' in the command prompt then i have the following error[详细]
2023-02-10 05:35 分类:问答Given a value of some path-dependent type, how can I get an instance of the "container"?
It\'s more easily explained in code: class Bippy { val x = 42 class Boppy { val y = \"hello world\" } val bop = new Boppy[详细]
2023-02-08 22:19 分类:问答