<div>Hi Marijn,</div>
<div> </div>
<div>I am new to Racket.  I did not expect that output is &quot;#&lt;procedure:...uments...&quot;.  It is like an error message to me.</div>
<div> </div>
<div>Because the restrictions on this function (and on others), I need to study more about Racket to go further.  I also need to code a function to remove the duplicates from a list.  There is a such function in Racket but I cannot use it. <br>
<br></div>
<div class="gmail_quote">On Tue, May 31, 2011 at 1:03 AM, Marijn <span dir="ltr">&lt;<a href="mailto:hkBst@gentoo.org">hkBst@gentoo.org</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Hi Yingjian,<br>
<div class="im"><br>On 05/31/11 01:17, Yingjian Ma wrote:<br>&gt; Hi All,<br>&gt;<br>&gt; I wrote a piece of code to count the occurrance of a letter in a list.  But<br>&gt; it gave me an error saying &quot;#&lt;procedure:...uments...&quot;<br>
<br></div>What makes you think it&#39;s an error?<br>
<div class="im"><br>&gt; The code is below:<br>&gt;<br>&gt; (define (count-matches s l)<br>&gt;       (cond<br>&gt;      [(empty? l) 0]<br>&gt;      [(equal? s (first l)) (lambda (i)(+ i 1))]<br>&gt;      [else (count-matches s (rest l))]))<br>
<br></div>Part of this code reads:<br><br>compare s to the first element of list l and if they are equal return a<br>function that returns its argument plus one (and forget about the rest<br>of the list).<br><br>Marijn<br>
<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v2.0.17 (GNU/Linux)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br><br>iEYEARECAAYFAk3koL8ACgkQp/VmCx0OL2ztFwCfUG1WrfbagBXTp7F9prAvvaL8<br>
sycAoJWBleSTJ/eE2CExwx1zt71Z1Lks<br>=e+cf<br>-----END PGP SIGNATURE-----<br></blockquote></div><br>