Loops/Foreach: Difference between revisions
Content added Content deleted
(Added Tailspin solution) |
|||
Line 2,429: | Line 2,429: | ||
end |
end |
||
endprogram</lang> |
endprogram</lang> |
||
=={{header|Tailspin}}== |
|||
Stream them |
|||
<lang tailspin> |
|||
['a', 'b', 'c'] ... -> !OUT::write |
|||
</lang> |
|||
{{out}} |
|||
<pre>abc</pre> |
|||
Lists/arrays can be put through an array transform to get the index as well |
|||
<lang tailspin> |
|||
['a', 'b', 'c'] -> \[i]('$i;:$; |
|||
' -> !OUT::write \) -> !VOID |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
1:a |
|||
2:b |
|||
3:c |
|||
</pre> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |