>
> 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
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
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,
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)
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
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 '('() ))
>
6 matches
Mail list logo