Lasso Soft Inc. > Home

[ set->insert ]


The [set->insert] method inserts the specified value into the set. The set is modified in-place and no result is returned.

  • Syntax
set->insert( value )
  • Beginner

To add elements to a set

Use the [set->insert] method. This example adds all of the elements of an array to a set.

Note: Since a set can only contain one of any given element, this is a simple method for removing duplicates from an array or map.


var( days = array('Mon','Tues','Fri','Tues','Sun','Sat','Mon'),
     myDays = set )

$days->forEach => {



set(Fri, Mon, Sat, Sun, Tues)

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