epoch-language
epoch-language copied to clipboard
foreach loops
Implement basic foreach() loops for iterating over a range or container. Should
support the use of generators and numeric ranges, when available.
entrypoint :
{
foreach(integer x in [100..2])
{
print(cast(string, x) ; " bottles of beer on the wall...")
}
print("Uh oh! Low on beer!")
}
Original issue reported on code.google.com by [email protected] on 15 Feb 2012 at 8:33
hmmm.... personally i prefer just combining for and foreach into one generic
"for"
entrypoint:
{
for(var x in [1...100])
{
print(cast(string, x));
}
}
Original comment by [email protected] on 15 Feb 2012 at 8:42