Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
6
Task/Loops-Foreach/Pluto/loops-foreach.pluto
Normal file
6
Task/Loops-Foreach/Pluto/loops-foreach.pluto
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
local languages = {"English", "French", "German", "Spanish"}
|
||||
for languages as lang do print(lang) end
|
||||
print()
|
||||
|
||||
-- or alternatively:
|
||||
languages:foreach(print)
|
||||
|
|
@ -3,11 +3,11 @@ REBOL [
|
|||
URL: http://rosettacode.org/wiki/Loop/Foreach
|
||||
]
|
||||
|
||||
x: [Sork Gun Blues Neds Thirst Fright Catur]
|
||||
names: [Sork Gun Blues Neds Thirst Fright Catur]
|
||||
|
||||
foreach i x [prin rejoin [i "day "]] print ""
|
||||
foreach name names [prin join name "day "] print ""
|
||||
|
||||
; REBOL also has the 'forall' construct, which provides the rest of
|
||||
; Rebol also has the 'forall' construct, which provides the rest of
|
||||
; the list from the current position.
|
||||
|
||||
forall x [prin rejoin [x/1 "day "]] print ""
|
||||
forall names [prin join names/1 "day "] print ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue