2011-07-26 15:50:15 +02:00
|
|
|
fn main() {
|
2011-08-19 15:16:48 -07:00
|
|
|
let x = [10, 20, 30];
|
2012-03-22 08:39:41 -07:00
|
|
|
let mut sum = 0;
|
2012-04-06 20:01:43 +02:00
|
|
|
for x.each {|x| sum += x; }
|
2011-07-27 14:19:39 +02:00
|
|
|
assert (sum == 60);
|
2011-08-15 21:54:52 -07:00
|
|
|
}
|