### Question:
Streams { public static <C extends Comparable<? super C>> Function<C, Stream<C>> toIntervalMin(final int size) { return sliceBest(Streams::min, size); } private  Streams(); static Function<C, Stream<C>> toStrictlyIncreasing(); static Function<C, Stream<C>> toStrictlyDecreasing(); static Function<T, Stream<T>> toStrictlyImproving(final Comparator<? super T> comparator); static Function<C, Stream<C>> toIntervalMax(final int size); static Function<C, Stream<C>> toIntervalMin(final int size); static Function<C, Stream<C>> toIntervalBest(final Comparator<? super C> comparator, final int size); static Function<C, Stream<C>> toIntervalMax(final Duration timespan); static Function<C, Stream<C>> toIntervalMax(final Duration timespan, final Clock clock); static Function<C, Stream<C>> toIntervalMin(final Duration timespan); static Function<C, Stream<C>> toIntervalMin(final Duration timespan, final Clock clock); static Function<C, Stream<C>> toIntervalBest(final Comparator<? super C> comparator, final Duration timespan); static Function<C, Stream<C>> toIntervalBest(
		final Comparator<? super C> comparator,
		final Duration timespan,
		final Clock clock
	);  }### Answer:
@Test(dataProvider = "toIntervalBestData") public void toIntervalMin(final int streamSize, final int sliceSize) { final ISeq<Integer> values = IntStream.range(0, streamSize).boxed() .flatMap(Streams.toIntervalMin(sliceSize)) .collect(ISeq.toISeq()); for (int i = 0; i < streamSize/sliceSize; ++i) { Assert.assertEquals(values.get(i).intValue(), sliceSize*i); } }
@Test public void toTimespanIntervalMin() { final ISeq<Integer> values = IntStream.range(0, 100).boxed() .flatMap(Streams.toIntervalMin(Duration.ofMillis(10), new TestClock())) .collect(ISeq.toISeq()); Assert.assertEquals(values.length(),10); Assert.assertEquals(values.get(0).intValue(), 0); int start = values.get(0); for (int i = 1; i < values.size(); ++i) { final int diff = values.get(i) - start; Assert.assertEquals(diff, 10); start = values.get(i); } }