I have a stream of objects and I would like to find the one with a maximal value of some attribute that\'s expensive to calculate.
As a specific simple example, say
Stream stringStream = stringList.stream(); String coolest = stringStream.reduce((a,b)-> coolnessIndex(a) > coolnessIndex(b) ? a:b; ).get()