The [pair->forEach] method allows an operation to be executed on each element of the pair in turn.
pair->forEach => {^ ^}
This example uses the [pair->forEach] method to return the size of each element in the pair.
Code
var( aPair = pair('First', 'Second') )
$aPair->forEach => {^
#1+' is '+#1->size+' letters long\n'
^}
Result
First is 5 letters long Second is 6 letters long
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments