Stream puzzler
Paul Sandoz
paul.sandoz at oracle.com
Mon Jan 14 02:49:00 PST 2013
On Jan 14, 2013, at 9:19 AM, Remi Forax <forax at univ-mlv.fr> wrote:
> Using the last binary drop (otherwise replace accumulate by collect),
> can you spot the bug (hint, it doesn't compile).
>
It compiles for me using a build from the tip.
Paul.
> import java.util.Arrays;
> import java.util.List;
> import java.util.stream.Accumulators;
>
> import static java.util.stream.Accumulators.*;
>
> public class Bug {
> public static List<Object> intoList(Object[] args) {
> return Arrays.stream(args).accumulate(intoList());
> }
> }
>
> Are we able to do something for that ?
>
> Rémi
>
More information about the lambda-libs-spec-observers
mailing list