-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Stream.peek returns a stream consisting of the elements of the original stream, additionally performing a provided action on each element as elements are consumed from the resulting stream. It would be very useful (for debugging, logging, etc.) to provide the same functionality for Optional, where peek() would take a Consumer and would return the Optional's original contents.
Stream.peek returns a stream consisting of the elements of the original stream, additionally performing a provided action on each element as elements are consumed from the resulting stream. It would be very useful (for debugging, logging, etc.) to provide the same functionality for Optional, where peek() would take a Consumer and would return the Optional's original contents.