I am trying to use a stream for something and I think I have a conceptual misunderstanding. I am trying to take an array, convert it to a stream, and .forEach item in the array I want to run a function and return a list of the results of that function from the foreach.
Essentially this:
Thing[] functionedThings = Array.stream(things).forEach(thing -> functionWithReturn(thing))
Is this possible? Am I using the wrong stream function?
StreamAPI. It has more methods than justforEach.