Stream generators

Remi Forax forax at univ-mlv.fr
Fri Nov 30 13:34:45 PST 2012


On 11/30/2012 09:11 PM, Brian Goetz wrote:
>> I don't think that infinite streams pull their weight,
>
> Well, they don't weigh that much, either -- they don't introduce new 
> concepts, they are just other ways to get a stream. 

As the Java Language Architect, do you allow me to introduce in the JDK 
all classes I want that weigh not much :)

> I think an integer range generator would be a reasonable minimum.

I agree.

>
> Many of the examples below can be synthesized from int ranges plus 
> existing stream ops:
>
>   intRange(...).map(e -> k)
>
> The "repeatedly" sequences also can be easily synthesized:
>
>   intRange(...).map(e -> supplier.get())

cheers,
Rémi



More information about the lambda-libs-spec-observers mailing list