Do you think something like this is intuitive, use...
# announcements
h
Do you think something like this is intuitive, useful, and not dangerous enough to be a part of the standard library?
Copy code
operator fun Int.compareTo(o: IntRange): Int = when {
    this in o -> 0
    this < o.start -> -1
    else -> 1
}
🚫 6