Re: [racket] Help with simple macro

2012-05-22 Thread Harry Spier
Thanks to this Eli, I now see what parameters are. By chance I also just came across your's, Ryan's and Matthew's article "Keeping It Clean with Syntax Parameters" http://www.schemeworkshop.org/2011/papers/Barzilay2011.pdf that makes crystal clear all the issues about the question I asked. Cheers

Re: [racket] Help with simple macro

2012-05-21 Thread Eli Barzilay
On Wednesday, Harry Spier wrote: > [...] > but I've been unable to create a macro to create this form: > --- > (with-sequence SOME-SEQUENCE > . . . .. . (get-next) . > . . . (get-next) . . . etc.) > --- > > where I don't pas

Re: [racket] Help with simple macro

2012-05-17 Thread Vasishtha Spier
Thanks William. Its not a for loop that I'm looking for, but rather a scope within which I have access to the sequence. A typical case will be where I have two procedures within the scope that are recursive but also pass control to each other under certain conditions, and each of these procedu

Re: [racket] Help with simple macro

2012-05-16 Thread William James
On Wed, 5/16/12, Harry Spier wrote: > I'm trying to create a macro to > simplify the syntax of having a local > scope with an indexed sequence generator. > > Instead of entering this: > (let-values ([(more? get next) (sequence-generate > (in-indexed SOME-SEQUENCE)]) >         (get-next) > ...

[racket] Help with simple macro

2012-05-16 Thread Harry Spier
I'm trying to create a macro to simplify the syntax of having a local scope with an indexed sequence generator. Instead of entering this: (let-values ([(more? get next) (sequence-generate (in-indexed SOME-SEQUENCE)]) (get-next) ...(get-next).. etc. )) I'd like to be able to enter this