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

2016-04-11 Thread Benjamin Greenman
> > but although I changed else expresion, Racket sometimes returns same > warning(but now with #f instead of #). After you call `select-room`, you'll want to check that the result is an mlist (instead of #f or #) before calling mcdr. -- You received this message because you are subscribed to

[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,

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

2016-04-10 Thread Gustavo Massaccesi
The most literal translation is #lang racket (define select-room (lambda (number rooms) (let loop ((l (mcar rooms))) (if (not (null? l)) (if (= (mcar(mcar l)) number) (mcar l)

[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(mcons 5(mcons 8 '('() )) >