Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Scheme
(define s (foldr + 0 x))
(define s (apply + x))
(define s (apply fx+ x))

fx+ is integer (fixnum) operation
(define s (fold-right + 0 x))

Chez Scheme
(define s (apply + x))
for E of x loop
   S := S + E;
end loop;

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

New implementation...
< >
deleplace