Skip to content

Instantly share code, notes, and snippets.

@raoulDoc
raoulDoc / ParallelStreamsPuzzler.java
Created June 13, 2016 21:56
Solving a Parallel Streams Puzzler
import java.util.List;
import java.util.stream.LongStream;
import static java.util.stream.Collectors.toList;
public class ParallelStreamsPuzzler {
public static void main(String[] args) {
List<Transaction> transactions
= LongStream.rangeClosed(0, 1_000)