I have the following, which works for ints:
int
extension IterableInt on Iterable { int get max => reduce(math.max); int get min =&