Is there a more compact form to write
n -> Iterators.take(Iterators.filter(predicate, Iterators.countfrom(1)), n) ?
Edit: The wording of my question has obviously given the impression that I am only concerned with syntactic sugar. Firstly I wanted to make sure that I had not overlooked an existing iterator. But secondly, to me this iterator seems to describe a very common task. Therefore I wonder whether it is worth building it explicitly, and if so, look if someone already has such a solution in the drawer.
If not, I will give bennedich’s solution the preference.