I noticed that some of the Scala code is like this:
val columnIDs = interactions.map({ case (_, columnID) =>
columnID}).distinct().collect()
but as I read the Scala style guide it should use infix notation like this
val columnIDs = interactions map ({ case (_, columnID) => columnID})
distinct() collect()
It seems that the former style, familiar in Java, may have side effects in
Scala, but perhaps I’m missing some Scala subtlety? I appears that both work
correctly in some tests I did.
http://docs.scala-lang.org/style/method-invocation.html#higherorder_functions
Before changing all my code am I reading this correctly?