rangeOfOrNull

inline fun <T> Iterable<T>.rangeOfOrNull(selector: (T) -> Float): ClosedFloatingPointRange<Float>?

Calls the selector function for each value in the collection and returns the range of the produced values.