Logo

Programming-Idioms

History of Idiom 54 > diff from v45 to v46

Edit summary for version 46 by thinkelman:
New Scheme implementation by user [thinkelman]

Version 45

2020-12-24, 16:46:14

Version 46

2021-04-15, 13:27:23

Idiom #54 Compute sum of integers

Calculate the sum s of integer list x.

Idiom #54 Compute sum of integers

Calculate the sum s of integer list x.

Variables
s,x
Variables
s,x
Code
(define s (fold-right + 0 x))
Comments bubble
Chez Scheme