fork download
  1. ; your code goes here
  2. (define (sum-list lst)
  3. (define (helper lst acc)
  4. (if (null? lst)
  5. acc
  6. (helper (cdr lst) (+ (car lst) acc))))
  7. (helper lst 0))
  8.  
  9. (display (sum-list '(1 2 3 4)))
Success #stdin #stdout 0.01s 10704KB
stdin
Standard input is empty
stdout
10