void () { DoubleStream stream = DoubleStream.concat(DoubleStream.of(1), DoubleStream.of(2)); Stream<String> stream2 = stream.mapToObj(String::valueOf); double random = Math.random(); OptionalDouble average = <warning descr="Stream has already been linked or consumed">stream</warning>.average(); }