16 lines
399 B
Scheme
16 lines
399 B
Scheme
(define (display-to-string val)
|
|
(let ((exp-port (open-output-string)))
|
|
(display val exp-port)
|
|
(get-output-string exp-port)))
|
|
|
|
;;expression as string
|
|
(define (write-to-string val)
|
|
(let ((exp-port (open-output-string)))
|
|
(write val exp-port)
|
|
(get-output-string exp-port)))
|
|
|
|
(define (on/off-option-processor name)
|
|
(lambda (option arg-name arg ops)
|
|
(cons (cons name #t) ops)))
|
|
|