I am currently using DrRacket on Mac OS X and choose the language “R5RS”, but when I enter
(random 100)
I get the error message:
reference to undefined identifier: random
What’s the problem here? Is it caused by a missing package?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is ‘random‘ a function provided by R5RS? I look for it in the index of the spec, but I don’t see it there. R5RS is a minimal language mode, and when Racket is in R5RS mode, it really restricts itself.
Racket does have a native random function. If you are using ‘#lang racket‘, it’s automatically available. Is there a reason you’re using the R5RS language mode?