Lasso Soft Inc. > Home

[ any->isAnyOf ]

Method

[any->isAnyOf] tests whether an object is any of the specified types or traits. Requires a a comma-separated list of types or traits as a parameter.

  • Syntax
any->isanyof(::type, ::trait, ... )
Examples
  • Beginner

To test if an object is any of specified types or traits:

Use the [any->isAnyOf] method. The following example tests whether an array is any of type set or array, and if so then inserts a new value into the array. Finally the result is output.

Code

local( mylocal = array )

if( #mylocal->isanyof(::set,::array) ) => {
  #mylocal->insert('OK')
}

#mylocal

Result

array(OK)

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft