I am a complete noob in Java 8 features and I am trying to generate a stream of Double objects as a result of processing a stream of Integers, something like this:
IntStream.range(0, 10).forEach(integer -> 50.0);
So I end up with a stream that looks like:
{50.0, 50.0, ... 50.0}
Now, I know forEach doesn't work like that and that this specific case can be solved in other simpler ways, but it's just for the sake of exposition.
Basically, what I am looking for is similar to a forEach except that it expects a return value for each element and is able to produce a stream too.