[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] syntax rules



shoot sorry plt-scheme and thanks don blaheta

----- Forwarded message from Don Blaheta <dpb@cs.brown.edu> -----

Looks like you meant to send that to the list, but you just sent it to
me....

Quoth Mike T. Machenry:
> > in order to get it to actually print, which is probably not what you
> > want.
> 
> yes, as i mentioned i don't want that. i read through that chaperter of
> mzscheme in the help-desk. it did not seem to tricky things like this where
> i want to desend a list of things and use each item in two places.
> 
> > This issue is a little trickier, as you'll need to have the
> > outer-level lambda in the expansion accept all the arguments at the same
> > time, but you still want to write your macro recursively.  This is a
> > pretty cool problem that (unfortunately) I don't have time to work on
> 
> thank you
> 
> > further, but I suspect that the solution will involve actual computation
> > during macro expansion, which can be tricky.  You'll probably want to
> > read up on how syntax-case works, for starters.
> 
> i definatly will, thanks for the reference.
> 
> >Work on this for a
> > while, and let us (me) know when you get stuck again. :)
> 
> i'll do that as well. thanks a bunch
> 
>   i'm thinking that i might want to break it up into a portion of the
> syntax that asserts types and a portion that creates the function. 
> i'll need to figure out how to break up the pieces. the following expansion
> (cond
>   ((not (number? foo))
>    (raise ...))
>   ...
>   (else
>     (lambda (foo ...)
>       ...)))
> could also work. does anyone know how i could simple turn the type-lambda
> into a regular lambda (taking the typed identifiers out) i can't seem to
> make it not curry the functions.
> 
> (type-lambda ((number? foo) (string? bar))
>   exp)
> expands to this in my new simplified problem
> (lambda (foo bar)
>   exp)
> 
> thanks again,
> -mike