Stream puzzler (original) (raw)
Remi Forax forax at univ-mlv.fr
Mon Jan 14 00:19:38 PST 2013
- Previous message: Optional.equals/hashCode
- Next message: Stream puzzler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Using the last binary drop (otherwise replace accumulate by collect), can you spot the bug (hint, it doesn't compile).
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 intoList(Object[] args) { return Arrays.stream(args).accumulate(intoList()); } }
Are we able to do something for that ?
Rémi
- Previous message: Optional.equals/hashCode
- Next message: Stream puzzler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-observers mailing list