PasteRack.org
Paste # 97487
2020-10-17 14:13:59

Fork as a new paste.

Paste viewed 362 times.


Embed:

  1. #lang racket
  2. (define (sum ns)
  3.     (if (null? ns)
  4.         0
  5.         (+ (first ns)
  6.         (sum (rest ns)))))
  7.  
  8. (sum '(6 3 -2 5 4 2 -3 4))

=>

19