(letrec ((recurse (lambda () (let ((item (assoc item-id (func tp)))) (cond ((and (pair? item) (number? (car item)) (null? (cdr item))) ;; there is a record, and it has an empty list (exhausted) #f) ((and (pair? item) (number? (car item)) (pair? (cdr item))) ;; there is a record, and it has list of entries, return those entries (car (cdr item))) (else ;; there is no record, download it and return (begin (tp-download-listing tp item-id) (recurse)) )))))) (recurse))) Error: (*) bad argument type: #f Call history: [recurse19138] (func tp) (trading-post-buy-listings x) [trading-post-buy-listings] (##sys#check-structure x (##core#quote trading-post)) [trading-post-buy-listings] (##sys#block-ref x 1) [recurse19138] (pair? item) [recurse19138] (number? (car item)) [recurse19138] (car item) [recurse19138] (null? (cdr item)) [recurse19138] (cdr item) [recurse19138] (pair? item) [recurse19138] (number? (car item)) [recurse19138] (car item) [recurse19138] (pair? (cdr item)) [recurse19138] (cdr item) [recurse19138] (car (cdr item)) [recurse19138] (cdr item) <--