class Foo
def getFoo(page: Int, pageSize: Int): Seq[Foo] = ???
@tailrec
def getFoo(page: Int): Seq[Foo] = {
val foos = getFoo(page,pageSize)
if(foos.size >= pageSize) foos else foos ++ getFoo(page+1)
}
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.