You could just call lst with num as a parameter. Or you might be looking for 
define-syntax not define. Is that possible? 


On Nov 17, 2012, at 1:05 AM, Monica Tomson wrote:

> Hi,
> 
> I have an experiment for my project, basically, I need to embedded some 
> s-expression into the code and make it run, like this,
> 
> (define (test lst)
>     (define num 1)
>     (define l (list))
>     `@lst) ; oh, this is not the right way to go.
> 
>   (define lst
>     `( (define num2 (add1 num))
>       (displayln num2)))
> I want the test function be like after test(lst) in racket code:
> 
> (define (test lst)
>     (define num 1)
>     (define l (list))
>     (define num2 (add1 num)
>     (displayln num2))
> How can I do this in racket?
> 
> Thanks,
> 
> --Monica
> 
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Attachment: smime.p7s
Description: S/MIME cryptographic signature

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to