Java 8 modify stream elements
问题 I wanted to write pure function with Java 8 that would take a collection as an argument, apply some change to every object of that collection and return a new collection after the update. I want to follow FP principles so I dont want to update/modify the collection that was passed as an argument. Is there any way of doing that with Stream API without creating a copy of the original collection first (and then using forEach or 'normal' for loop)? Sample object below and lets assume that I want