The generic list algorithm in the
I was able to fix up the code and get it working (provided below) as per the spirit of the tutorial. Perhaps that tutorial is out of date to newer language features or something.
Code Select
(define (list-length a-list)
(if (first a-list)
(+ 1 (list-length (rest a-list)))
0))
Code Select
(define (list-length a-list)
(if a-list
(+ 1 (list-length (rest a-list)))
0))