public static <T> Stream<T> intersperse(final Stream<T> stream, final T value) {
        return stream.flatMap(t -> Stream.of(value, t))
                     .skip(1);
    }
public static < T > Stream < T > intersperse ( final Stream < T > stream , final T value ) { return stream . flatMap ( t -> Stream . of ( value , t ) ) . skip ( 1 ) ; }
Returns a stream with a given value interspersed between any two values
of this stream.

<pre>
{@code
assertThat(Arrays.asList(1, 0, 2, 0, 3, 0, 4),
equalTo( Streams.intersperse(Stream.of(1, 2, 3, 4),0));
}
</pre>