$max = reduce { complex_calculation($a) > complex_calculation($b) ? $a : $b };