In Java 8 using streams when I chain methods one after the another the execution of operations are performed in pipelined manner.
Example:
List
I would suggest to use libraries like RxJS. This gives you more control over the kind of processing, should it be sequential, parallel or whatsoever.
Here is an example, which is close to what you expect:
const source = Rx.Observable.from([{name: 'Joe', age: 30}, {name: 'Frank', age: 20},{name: 'Ryan', age: 50}]);
const example = source.map(person => {
console.log("Mapping1" + person.name)
return person.name
});
const subscribe = example.subscribe(val => console.log(val));
outputs:
"Mapping1Joe"
"Joe"
"Mapping1Frank"
"Frank"
"Mapping1Ryan"
"Ryan"