Whast you describe seems correct. How about showing me yoyur code after deleting vector->list? If this is HOMEWORK, send it OFF LIST. What language did you use? Jos
_____ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Yingjian Ma Sent: 02 June 2011 08:45 To: users@racket-lang.org Subject: [racket] please help to change vector to list Hi ALL, I have this code (define test (lambda (x v) (define helper (lambda (ls) (cond ((empty? ls) '()) ((empty? (rest ls)) '()) ((equal? (second ls) x) (cons (first ls) (helper (rest ls)))) (else (helper (rest ls)))))) (helper (vector->list v)))) When I run it with > (test 'a #(b a c a)) it returns '(b c) Is there a way to use the list such as (test 'a '(b a c a))? I tried to delete vector->list from the last line of the code, but it did not work. Why? Thanks a lot
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users