Hi folks,
I can't get an example to evaluate when it has define in it. I've tried lots of stuff. The example in the scribble documentation works, but that uses typed racket. I don't want to use typed racket:
@examples[#:eval my-evaluator
(define (positive-integer? x)
(and (positive? x)
(integer? x)))]
Earlier I tried:
@examples[#:eval my-evaluator
(define (positive-integer? x)
(and (positive? x)
(integer? x)))
(positive-integer? 42)]
DrRacket says "examples: exception raised in example
error: "define: function definitions are not allowed in the interactions window; they must be in the definitions window""
Thanks for your help.