score:2

Accepted answer

this is occurring because the last line in your map lambda is an assignment. assignment expressions evaluate to unit. what you want is the following:

val pages = (bookfile \ "pages" ).map { pagenode =>
  loadpage(pagenode)
}

that should get you a sec[page]. to convert it to a list[page], use the tolist method on the result.


Related Query

More Query from same tag