Lazily take the first n values from a generator