You did it:
(y.lines).toList(b (ls.head))
With the only possible correction:
(y.lines).toList(b).apply(ls.head)
I am not sure what Scala will solve in this particular case.
The rule, roughly speaking, is object (method parameters)* [method] . The compiler will continue until it finds markers for the actual expression. A ; terminates the expression, as well as a ) or } . If the next line is blank, the expression also ends. If the next line starts with a reserved keyword ( val , def , if , etc.), the expression will also end.
Daniel C. Sobral
source share