028-list-recursion.scm (173B)
1 ; Recursive list traversal using cons/car/cdr/null?/+. 2 (define (sum-list xs) 3 (if (null? xs) 0 (+ (car xs) (sum-list (cdr xs))))) 4 (sys-exit (sum-list '(1 2 3 4 5))) ; 15
boot2Playing with the boostrap | |
| git clone https://git.ryansepassi.com/git/boot2.git | |
| Log | Files | Refs | README |