I'm new to Scala, so I apologize if this question seems trivial. I use Scala tables to evaluate some of the classes that I wrote, and it seems that the worksheet that I use does not evaluate the last compiled code.
For example,
I have a method that does the following:
def randomPermute(xs: List[Any]): List[Any] = {
randomSelect(xs.length, xs)
}
which after the initial compilation and evaluation of the base list produced:
List('f, 'a, 'c, 'd, 'b, 'e)
However, after I changed this method to
def randomPermute(xs: List[Any]): List[Any] = {
//randomSelect(xs.length, xs)
Nil
}
After re-evaluating with the sheet, I still get a random permutation of the list.
Is there an error in the settings of my project?
Am I just misunderstanding Scala?
Note. I am using IntelliJ Idea CE 15
source
share