mylength



Write a function that returns the length of a list (without using the scheme length function).


Solution

(define (mylength a)
  (if (null? a)
      0
      (+ 1 (mylength (cdr a)))))