I thought the dot between a collection and the map function was optional, but it seems like there is more to the story than that.
This works in both formats:
scala> List(1,2,3) map (_*2)
res6: List[Int] = List(2, 4, 6)
scala> List(1,2,3).map (_*2)
res7: List[Int] = List(2, 4, 6)
This fails:
scala> articleFiles map (file => (file \\ "contentitem").map( a => (a \ "@id").text) ).flatten
<console>:17: error: missing parameter type
articleFiles map (file => (file \\ "contentitem").map( a => (a \ "@id").text) ).flatten
^
But this works:
scala> articleFiles.map (file => (file \\ "contentitem").map( a => (a \ "@id").text) ).flatten
res7: scala.collection.immutable.Seq[String] = List(20761, 22798, 22799, 21167, 21438, 20770, 21480, 21906, 21907, 21923, 22766, 22771, 22794, 22800, 22803, 22804, 22818, 22819, 22820, 22821, 20456, 20771, 21337, 21542, 21590, 20768, 20775,
Note, the only difference between the last 2 examples is the dot in articleFiles.map