racket/collects/srfi/38/38.rkt
2010-04-27 16:50:15 -06:00

15 lines
489 B
Racket

#lang scheme/base
(define (write-with-shared-structure val [port (current-output-port)] [optarg #f])
(parameterize ([print-graph #t]) (write val port)))
(define (read-with-shared-structure [port (current-input-port)] [optarg #f])
(parameterize ([read-accept-graph #t])
(read port)))
(provide write-with-shared-structure
(rename-out [write-with-shared-structure write/ss])
read-with-shared-structure
(rename-out [read-with-shared-structure read/ss]))