import AppKit extension Comparable { public func until(incl bound: Self) -> ClosedRange? { self <= bound ? self ... bound : nil } public func until(excl bound: Self) -> Range? { self < bound ? self ..< bound : nil } }