scala-2.11 Questions
1
Solved
I've just recently updated a Scala project from 2.10 to 2.11.2.
For the following code:
if( x < 1.e-150 ) // conditional ops...
I'm getting the error
e is not a member of Int
Previou...
Lubric asked 12/9, 2014 at 10:26
2
So I've got this super exciting Java class:
import scala.collection.immutable.Stream;
public class EmptyStreamFactory {
public static Stream<String> createEmptyStringStream() {
return Str...
Erkan asked 24/8, 2014 at 0:13
3
Solved
I am new to Scala and Spec2.
I would like to create the following test but I get an error from the compiler.
Here is the test I would like to write
import org.specs2.mutable._
import org.specs2....
Personification asked 13/8, 2014 at 15:21
1
Solved
In the sbt console, sbt version 0.13.5, Scala version 2.11.1, I can get javax.script.ScriptEngine for Scala:
scala> val engine = new javax.script.ScriptEngineManager().getEngineByName("scala")
...
Goody asked 30/5, 2014 at 18:23
3
Solved
I want to do something like this:
def assuming[A](condition: => Boolean)(f: => A): A = {
require(condition, /* print source-code of condition */)
f
}
Sample usage:
def fib(n: Int) = n m...
Crocus asked 24/4, 2014 at 6:10
1
Solved
Reading the release notes for Scala 2.11.0-RC1, I noticed that the splitting-off of scala xml to a separate jar is starting with the 2.11 series. Will this affect the use of xml literals, in 2.11 o...
Cooler asked 6/3, 2014 at 11:35
3
How can I access the name of the code file and line number in a Scala macro? I looked at SIP-19 and it says it can be easily implemented using macros...
EDIT:
To clarify, I want the code file and ...
Absorbance asked 24/4, 2014 at 6:3
© 2022 - 2024 — McMap. All rights reserved.