fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 7: Iterate over list indexes and values
Idiom # 7: Iterate over list indexes and values
See
programming-idioms.org
:
Code
# using a loop for x in items i in 0.. do say "Item $i = $x" # using zip say (items.zip 0.. x,i->"$i:$x")
What are effects?
Running Example
ex7 is items := array 10 i->"string#$i" # using a loop for x in items i in 0.. do say "Item $i = $x" # using zip say (items.zip 0.. x,i->"$i:$x")
What are effects?
last changed: 2024-07-01
next: Idiom # 8: Initialize a new map (associative array)