You need collections with two elements, for example to ensure that
items.dropFirst().min()
or items.sort().take(2)
are safe to call.Because of that, I think having min() return Either(int,error) is the way to go for most languages (‘researchy’ languages can be an exception)
Enforcing abs to work for all integers would be higher on my list. Are there any languages that have INT_MAX == -INT_MIN and interpret 0x80…0 as ‘Not a Number? That could be used as return value for min() on empty sequence, too.