"demand" does not work in dr racket

I am new to the circuit and I am trying to trace a function. I need to load the trace function. In accordance with the documentation for the racket, I must perform:

(racket / trace required)

But the answer I get is

required: undefined;

cannot refer to undefined identifier

I am puzzled. I use the language "R5RS" if that matters. can't find anything online or stack overflow on this.

+4
source share
2 answers

Chris Jetter-Young Comment: Do not use R5RS. There is no such thing as a module in the standard R5RS language. Check out http://www.schemers.org/Documents/Standards/R5RS/ ; not a word about the module, right?

Racket takes the standard more seriously than you expected: if you say that it works in R5RS mode, it will turn off off language features that the standard does not describe.

If you use the Racket toolchain, do not use the R5RS language unless you really want to work in a restrictive language. Instead, use the standard #lang racket. See: http://docs.racket-lang.org/guide/intro.html , which shows how to use it in this mode.

+5
source

Try the following:

(#%require racket/trace) 
+7
source

Source: https://habr.com/ru/post/1437099/


All Articles