Hi, is it possible to create (un)bounded ranges/in...
# announcements
o
Hi, is it possible to create (un)bounded ranges/intervals (math) ,like:
[1,3]
is
( x >= 1 && x <= 3 )
[1,3)
is
( x >= 1 && x <  3 )
(1,3]
is
( x >  1 && x <= 3 )
(1,3)
is
( x >  1 && x <  3 )
to achieve:
Copy code
when(value){
    in [0,1) -> doOne()
    in [1,3) -> doRed()
    in [3,10) -> doJump()
    else -> doElse() // for 10 and more
}