I think using nulls as bounds is a pretty rare cas...
# stdlib
m
I think using nulls as bounds is a pretty rare case and one can write something like that:
Copy code
value = lowerBound?.let { value.coerceAtLeast(it) }
value = upperBound?.let { value.coerceAtMost(it) }