`Delegates.vetoable`?
# announcements
d
Delegates.vetoable
?
s
Yeah thanks, that's close to what i'm thinking. However I was wondering if there is a built in one that basically does a Math.min, Math.max call instead of making my own
d
I don't think so.
But
var foo by Delegates.vetoable(3) { _, _, newValue -> newValue in 0..3 }
is pretty concise.
👍 1
❤️ 1
k
yeah, that doesn't exist but would be pretty easy to implement yourself