Re: [racket] for-each

2012-12-12 Thread Danny Yoo
On Wed, Dec 12, 2012 at 7:19 PM, Dman P wrote: > I was looking for a good example of the racket function for-eachI have > been trying to implant it but can not seem to get it work Have you been able to find the example in the documentation? http://docs.racket-lang.org/reference/pairs.

Re: [racket] for-each

2012-12-12 Thread Grant Rettke
A good example, it is like map, but for when you only care about side effects. On Wed, Dec 12, 2012 at 8:19 PM, Dman P wrote: > I was looking for a good example of the racket function for-eachI > have been trying to implant it but can not seem to get it work > > > >

Re: [racket] for-each

2012-12-12 Thread Kieron Hardy
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,

[racket] for-each

2012-12-12 Thread Dman P
I was looking for a good example of the racket function for-eachI have been trying to implant it but can not seem to get it work Racket Users list: http://lists.racket-lang.org/users