Lasso Soft Inc. > Home

[ pair->forEach ]


The [pair->forEach] method allows an operation to be executed on each element of the pair in turn.

  • Syntax
pair->forEach => {^  ^}
  • Beginner

Perform an operation on each element of a pair

This example uses the [pair->forEach] method to return the size of each element in the pair.


var( aPair = pair('First', 'Second') )

$aPair->forEach => {^
     #1+' is '+#1->size+' letters long\n'


First is 5 letters long
Second is 6 letters long

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