<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16421"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New">Whast you describe seems correct.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New">How about showing me yoyur code after deleting
vector->list?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New">If this is HOMEWORK, send it OFF LIST.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><SPAN
class=553100711-02062011><FONT size=2 face="Courier New">What language did you
use?</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><SPAN
class=553100711-02062011><FONT size=2
face="Courier New"></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=553100711-02062011><FONT size=2
face="Courier New">Jos</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org
[mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>Yingjian
Ma<BR><B>Sent:</B> 02 June 2011 08:45<BR><B>To:</B>
users@racket-lang.org<BR><B>Subject:</B> [racket] please help to change vector
to list<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi ALL,</DIV>
<DIV> </DIV>
<DIV>I have this code</DIV>
<DIV> </DIV>
<DIV>(define test <BR> (lambda (x
v) <BR> (define
helper <BR>
(lambda (ls)
<BR>
(cond
<BR> ((empty? ls)
'())
<BR> ((empty? (rest ls))
'())
<BR> ((equal? (second
ls) x) (cons (first ls) (helper (rest
ls))))
<BR> (else (helper (rest
ls)))))) <BR> (helper (vector->list v))))
</DIV>
<DIV> </DIV>
<DIV>When I run it with </DIV>
<DIV>> (test 'a #(b a c a))</DIV>
<DIV>it returns<BR>'(b c)</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>Thanks a lot</DIV></BLOCKQUOTE></BODY></HTML>