case

initiate a case block to check for different cases


Parameters

case predicate :null :block

Returns

  • :nothing

Examples

copy
a: 2 case [a] when? [<2] -> print "a is less than 2" when? [=2] -> print "a is 2" else -> print "a is greater than 2"

Related