[racket] for-each
I don't know if it's a particularly good example, but here's a basic usage
of for-each:
#lang racket
(define lst '(apple banana cherry))
(for-each
(lambda (x)
; x is bound to each item of lst in turn
(printf "item:~a~n" x)
; do something more with x
)
lst)
Hope this helps,
Kieron.
On Wed, Dec 12, 2012 at 7:19 PM, Dman P <dmandus at gmail.com> wrote:
> 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
>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121212/3b1c6ca7/attachment-0001.html>