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)


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

 #: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 
For more options, visit

Reply via email to