I'm parsing some XML, and I'm chaining calls without a dot. All of these methods take no parameters (except \\
, which takes one), so it should be fairly possible to chain them without a dot, right?
This is the code that does not work:
val angle = filteredContextAttributes.head \\ "contextValue" text toDouble
The error is: not found: value toDouble
However, it does work like this:
(filteredContextAttributes.head \\ "contextValue" text) toDouble
text
returns only a String
and does not take parameters, and I don't see any other parameters needed in \\
to cause an issue.
What am I missing? I don't want to hack it out, but to understand what' the problem.
And also I can't use head
without the dot. When removing the dot it says: Cannot resolve symbol head