hi, I wanted to do all checks using when
so my function takes one argument as Int and another one as Int, in the body of the function I do the sum of two and I wanted to use when like so
"fun abc(size : Int, x : Int)"
when(sum) {
is bigger than size -> return false
is it possible to make "is bigger than" in when condition?
s
spand
05/31/2018, 7:39 AM
Copy code
when {
sum > size -> return false
else -> return true
}
b
B_P
05/31/2018, 7:40 AM
ahhh, I see my problem (I was putting after when (sum) and you omitted it there, thanks 😄