Use iterators for first_n() and all().