jimn
01/05/2020, 8:44 AM(LocalDate.MAX t2 LocalDate.MIN)
except with some keyboard practice for each of the primitive types getting thier own minmax
2. related to existing keyboard practice: min and max don't want to behave in intellij with a generic syntax and it's hard to guess the intent of max`Of` vs. max, min`Of` vs. min -- since they both evaluate on pairs where list`Of` for instance operates on vararg<T>
3. i distrust an immutable loop return where an array of two mutable values might have more mechanical sympathy
fun feature_range(seq: Sequence<LocalDate>):Pair</**min*/LocalDate,/**max*/LocalDate> = seq.fold(LocalDate.MAX to LocalDate.MIN) { (a, b), localDate ->
minOf(a, localDate) to maxOf(b, localDate)
}
jimn
01/05/2020, 8:59 AMjimn
01/05/2020, 9:04 AM