Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Go
s := 0
for _, v := range x {
	s += v
}

Such explicit loops are idiomatic in Go.
for E of x loop
   S := S + E;
end loop;

x is an array.
S is initialized to be 0.

New implementation...
< >
deleplace