Re: [racket-users] How to call a macro on each element of a list

2016-03-31 Thread cnandi
On Thursday, March 31, 2016 at 1:00:55 AM UTC-7, cna...@cs.washington.edu wrote: > On Wednesday, March 30, 2016 at 5:37:08 PM UTC-7, Neil Van Dyke wrote: > > Does either the below `fun-now` or `make-fun-for-later` do what you want? > > > > BEGIN CODE > > #lang racket/base > > > > (defin

Re: [racket-users] How to call a macro on each element of a list

2016-03-31 Thread cnandi
On Wednesday, March 30, 2016 at 5:37:08 PM UTC-7, Neil Van Dyke wrote: > Does either the below `fun-now` or `make-fun-for-later` do what you want? > > BEGIN CODE > #lang racket/base > > (define conditional-actions >(list (cons (lambda () (= 2 (+ 1 1))) >(lambda () (d

Re: [racket-users] How to call a macro on each element of a list

2016-03-30 Thread cnandi
On Wednesday, March 30, 2016 at 2:21:52 PM UTC-7, Neil Van Dyke wrote: > cna...@cs.washington.edu wrote on 03/30/2016 05:11 PM: > > I still need to explicitly pass all the arguments to mysyn such as: > > (mysyn 1 2 3). Is there a way to pass a list l by its name and not its > > values. > > For ins

Re: [racket-users] How to call a macro on each element of a list

2016-03-30 Thread cnandi
On Wednesday, March 30, 2016 at 1:45:09 PM UTC-7, Robby Findler wrote: > Perhaps we should improve the syntax-parse documentation? I found the > overview and examples to be pretty good, tho. > > Robby > > > On Wed, Mar 30, 2016 at 3:42 PM, Neil Van Dyke wrote: > > Oops, I usually end up typing

[racket-users] How to call a macro on each element of a list

2016-03-30 Thread cnandi
Consider a toy macro defined as: (define-syntax mysyn (syntax-rules(fun) [(mysyn element ...) (begin #`(define fun (display element)...))])) and a list: (define l '(1 2 3)) Is there a way to call the macro like so: (mysyn l). When I try this, the syntax ob