min method

int? min(
  1. int selector(
    1. T
    )
)

Implementation

int? min(int Function(T) selector) {
  if (isEmpty) {
    return null;
  }

  return skip(1)
      .fold(selector(first), (prev, next) => math.min(prev!, selector(next)));
}