Using scheme/racket to return specific items from a list
问题 What I would like to do is create a function that takes in a list of values and a list of characters and coalesce the corresponding characters("atoms" I think they would technically be called) into a new list. Here is what I have so far; #lang racket (define (find num char) (if (= num 1) (car char) ;Problem here perhaps? (find (- num 1) (cdr char)))) (define (test num char) (if (null? num) '("Done") (list (find (car num) (test (cdr num) char))))) This however gives me an error, which for the