by default all collections (except stream and views) in Scala are strict, so each function over collection:
pages
.map(parser)
.zipWithIndex
.map { partialFunction }
will return new collection. You could avoid some intermediate results using view, and then forcing it back to your collection type:
pages.view
.map(parser)
.zipWithIndex
.map { partialFunction }
.force
for more details http://www.scala-lang.org/docu/files/collections-api/collections_42.html