How can I make definitions-area examples using the HtDP languages in Scribble?

I tried the following, but since the evaluator corresponds to the
interactions-area, it complains about definitions not being allowed:

#lang scribble/manual
@(require racket/sandbox scribble/example)

@title{Notes}

@(define my-evaluator
   (parameterize ([sandbox-output 'string]
                  [sandbox-error-output 'string])
     (make-evaluator '(lib "lang/htdp-beginner.ss"))))

@examples[
 #:no-prompt
 #:eval my-evaluator
 (define (distance x y) (sqrt (+ (sqr x) (sqr y))))

 (distance (distance 3 4) 5)]

-- 
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 https://groups.google.com/d/optout.

Reply via email to