You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sugar/debug.rkt

17 lines
408 B
Racket

#lang racket/base
(provide report describe)
; report the current value of the variable, then return it
(define-syntax-rule (report var)
(begin
(displayln (format "~a = ~a" 'var var) (current-error-port))
var))
(require (prefix-in williams: (planet williams/describe/describe)))
(define (describe x)
(parameterize ([current-output-port (current-error-port)])
(williams:describe x))
x)