Thursday, October 8, 2015

starting with method newCanBuildFrom in object SortedSet

I was trying to loop over Scala Enumeration values like this:
  • aEnumeration.values.map(<something>)
And I got all sort of errors that seem to be unrelated to this. So I had to comment line by line to finally found this was causing the problem.

So, to remove this exception you just have to convert Enumeration values into a Scala List:
  • aEnumeration.values.toList.map(<something>)

Exception gone!

No comments:

Post a Comment