Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

If a series that is being traversed by FOREACH, FORALL, or FORSKIP is modified during execution of the traversal, do the modifications apply to the traversal?

0
0 Posted

If a series that is being traversed by FOREACH, FORALL, or FORSKIP is modified during execution of the traversal, do the modifications apply to the traversal?

0
0

Yes. FOREACH, FORALL and FORSKIP use an updated version of the series argument each iteration through. Example: series: [1 2 3 4 5] foreach item series [ print item remove back tail series ] The above example will print the numbers 1 through 3 and the modified series will be [1 2].

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123