j
biggest, biggest_fn = lhs[0], safe_apply(rhs, lhs[0], ctx=ctx) for item in biggest[1:]: if safe_apply(rhs, item, ctx=ctx) > biggest_fn: biggest, biggest_fn = item, safe_apply(rhs, item, ctx=ctx) return biggest
max_by_function
for item in biggest[1:]:
lhs[1:]