; SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
; For more information, please refer to <https://unlicense.org/>
; SPDX-License-Identifier: Unlicense
(import-from "r5rsish" (list null? car cdr +))
(define sum (lambda (self xs)
(if (null? xs)
0
(+ (car xs) (self self (cdr xs))))))
(sum sum (list 99 44 66 1))