I am trying to implement pagination with lambdas, but it seems it is not possible without the good-old-do-while cycle: