Stream generators (original) (raw)
Remi Forax forax at univ-mlv.fr
Fri Nov 30 11:46:05 PST 2012
- Previous message: Stream generators
- Next message: Stream generators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/30/2012 06:21 PM, Brian Goetz wrote:
We've got a few generators for infinite streams already implemented. For object streams:
some wildcards are missing.
// produces seed, f(seed), f(f(seed)), ... iterate(T seed, UnaryOperator f) // infinite constant sequence repeat(T t) // finite constant sequence repeat(int n, T t) // infinite sequence driven by a supplier function repeatedly(Supplier f)
should be a Supplier(? extends T>.
// finite sequence driven by a supplier function repeatedly(int n, Supplier f) same as above.
// infinitely cycle through an Iterable cycle(Iterable iterable)
should be an Iterable<? extends T>.
For integer streams, the above, plus range(int from, int to) range(int from, int to, int step)
Rémi
- Previous message: Stream generators
- Next message: Stream generators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-observers mailing list