I don't know if it's a particularly good example, but here's a basic usage of for-each:<br><br>#lang racket<br><br>(define lst '(apple banana cherry))<br><br>(for-each<br> (lambda (x)<br> ; x is bound to each item of lst in turn<br>
(printf "item:~a~n" x)<br> ; do something more with x<br> )<br> lst)<br><br>Hope this helps,<br><br>Kieron.<br><br><div class="gmail_quote">On Wed, Dec 12, 2012 at 7:19 PM, Dman P <span dir="ltr"><<a href="mailto:dmandus@gmail.com" target="_blank">dmandus@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I was looking for a good example of the racket function for-each I have been trying to implant it but can not seem to get it work</div>
<br>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br>