Re:Teeing, a hidden gem in the Java API
by grumpyprole on Monday May 10, 2021 @04:05AM
(#27103739)
The "teeing" combinator is giving you separation of concerns. There are two separate calculations, potentially defined in separate functions, that are composed into a single operation that is performed in a single pass of the stream. Sure, you could write a monolithic imperative for-loop that does it all, but such an approach will not scale.
[ Parent
| on HN ]
There are no comments on this comment yet.