Lasso Soft Inc. > Home

[ repeat ]

Method

Repeats the elements N times.

  • Syntax
  • Methods
  • Traits
repeat(array(...), integer)
Has methods:
  • repeat->oncreate(d::trait_forEach, t::integer)
  • repeat->d()
  • repeat->d=(d)
  • repeat->t()
  • repeat->t=(t)
  • repeat->forEach()
Examples
  • Beginner

Output each element in an array 6 times.

Code

with n in repeat((:1, 2, 3, 4), 6)
select #n

Result

1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4

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