Loops/Foreach: Difference between revisions
Content deleted Content added
Walterpachl (talk | contribs) m remove a tag that went astray |
Frink |
||
Line 637:
: .array ( a len -- )
cells bounds do i @ . cell +loop ; \ 3 2 1</lang>
=={{header|Frink}}==
Frink's <CODE>for</CODE> loop is actually a "for each" loop which can iterate over built-in collection types including arrays, sets, dictionaries, enumerating expressions, and Java types such as Map, Iterator, Enumeration, etc.
<lang frink>
array = [1, 2, 3, 5, 7]
for n = array
println[n]
</lang>
=={{header|F_Sharp|F#}}==
|