Logo

Programming-Idioms

  • Lisp
  • Js
var s = x.reduce((a, b) => a + b)
var s = x.reduce((a, b) => a + b, 0);
(reduce #'+ x)
for E of x loop
   S := S + E;
end loop;

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

New implementation...
< >
deleplace