switch

?

if condition is not false or null perform given action, otherwise perform alternative action


Parameters

switch condition :any
       action :block
       alternative :block

Returns

  • :any

Examples

copy
x: 2 switch x=2 -> print "yes, that's right!" -> print "nope, that's not right!" ; yes, that's right!

Related