3 ms·
How about this then? IntStream.range(0, 100).filter(::even);
by incepted 11y ago
How about this then?
IntStream.range(0, 100).filter(::even);
- j-pb 11y agoNot quite what was asked. The intended outcome is a sequence of length 1000 where the elements are 1 * true, 2 * false, 3 * true, 4 * false and so on. To compare it with what your code produces. [true false false true true true false false false false ...] [true false true false true false true false true false ...]