[#27] Better maxBy / minBy functions