void (String[] args) { final int[] ints = new int[9]; final Stream<Object> empty = Stream.empty(); final IntStream range = range(0, 9); empty.flatMap(e -> range.mapToObj(i -> range.mapToObj(j -> ints))); final Stream<int[]> stream = empty.flatMap(e -> range(9, 0).mapToObj(i -> range.mapToObj(j -> ints))).flatMap(s -> s); System.out.println(stream); }