When using myList.length() you will get an error message similar to this one
[INFO] Compiling 10 source files to /.../target/classes at 1317721118837 [ERROR] /.../src/main/scala/code/lib/MyLib.scala:216: error: Int does not take parameters [INFO] var listLength = myList.length() |
What the error means is that length is not a function, but simply a property and you should use myList.length and not myList.length()