Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Min and Max by gflegar
def f(c, *a, **k):
k, a = k.get("key", lambda x : x), list(a if len(a) > 1 else a[0])
return next(filter(lambda x: all(c(k(x),k(y)) for y in a), a))
min = lambda *a, **k: f(lambda x, y: x <= y, *a, **k)
max = lambda *a, **k: f(lambda x, y: x >= y, *a, **k)
June 4, 2014
Comments: