orangy
val name = expression.validate {
… some validation clauses…
}
So that there could be range checks, nullity, etc. I didn’t put any thought into it yet, but I feel the need in many places.Ruckus
03/20/2018, 3:51 PMfun <T> T.validate(predicate: (T) -> Boolean): T {
require(predicate(this))
return this
}
🧌