[racket-users] Re: Problem with macro which implements selectors for mutable pairs

2016-05-12 Thread Joan Martin
Thank for all your answers. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit

[racket-users] Re: Problem with macro which implements selectors for mutable pairs

2016-05-12 Thread Joan Martin
Sorry, In my code, there is (car l) but of course it should be (car selectors). (let ((loop (gensym))) `(let ,loop ((selectors (,seek2 (quote ,@body)) )) ;;list of selectors (cond ((null? selectors) (,@body)) (else (define (car selectors)

[racket-users] Problem with macro which implements selectors for mutable pairs

2016-05-12 Thread Joan Martin
Hi, I'm trying to program a macro which defines different selectors for mutable pairs. I know in Racket it's possible to use only mcar and mcdr, but mcdar etc. could be useful for me. I would like to use macro this way: (with-mcxrs (let ((a (mcons (mcons 1 2) (mcons (mcons 3 4) '()

[racket-users] Re: Problem with # and mutable lists

2016-04-10 Thread Joan Martin
Sorry, now with attachment. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit

[racket-users] Re: Problem with # and mutable lists

2016-04-10 Thread Joan Martin
Thank you very much, but although I changed else expresion, Racket sometimes returns same warning(but now with #f instead of #). But when I click Run again (sometimes twice or more) it returns what I want. That´s the strangest thing. Could it be an error in Racket settings? I attach my code,

[racket-users] Re: Problem with # and mutable lists

2016-04-10 Thread Joan Martin
Thank for your answer, but how should I change the procedure and ged rid of Racket warning? I cant figure it out. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email

[racket-users] Re: Problem with # and mutable lists

2016-04-10 Thread Joan Martin
Dne neděle 10. dubna 2016 13:29:43 UTC+2 Joan Martin napsal(a): > Hello, > I try to write a programme (a game), where I use lots of mutable lists (named > environment).Something like this: > (define environment > (mcons (mcons (mcons 1 (mcons (mcons 2(

[racket-users] Problem with # and mutable lists

2016-04-10 Thread Joan Martin
Hello, I try to write a programme (a game), where I use lots of mutable lists (named environment).Something like this: (define environment (mcons (mcons (mcons 1 (mcons (mcons 2(mcons 5(mcons 8 '('() )) (mcons (mcons 2 (mcons (mcons 1(mcons 3(mcons 10 '( '() ))