I have this which has been handy for a few things ...
# announcements
d
I have this which has been handy for a few things
Copy code
inline fun <R> sorted(a: Int, b: Int, block: (min: Int, max: Int) -> R): R =
    block(Math.min(a, b), Math.max(a, b))