- :null
- :any
attr
get given attribute, if it exists
Parameters
attr name :string :literal
Returns
Examples
copymultiply: function [x][ switch attr? "with" -> x * attr "with" -> 2*x ] print multiply 5 ; 10 print multiply.with: 6 5 ; 60
attr name :string :literal
copymultiply: function [x][ switch attr? "with" -> x * attr "with" -> 2*x ] print multiply 5 ; 10 print multiply.with: 6 5 ; 60