mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 22:59:16 +02:00
Splitting write into write (cycles only) and write-shared.
This commit is contained in:
parent
74d0980b82
commit
6b467f4452
1 changed files with 5 additions and 3 deletions
|
@ -1,8 +1,10 @@
|
|||
|
||||
(define-library (scheme write)
|
||||
(import (rename (chibi) (write write-simple) (display display-simple))
|
||||
(rename (srfi 38) (write/ss write)))
|
||||
(export display write write-simple)
|
||||
(rename (srfi 38) (write/ss write-shared)))
|
||||
(export display write write-shared write-simple)
|
||||
(begin
|
||||
(define (display x . o)
|
||||
(apply (if (or (string? x) (char? x)) display-simple write) x o))))
|
||||
(apply (if (or (string? x) (char? x)) display-simple write) x o))
|
||||
(define (write x . o)
|
||||
(write-shared x (if (pair? o) (car o) (current-output-port)) #t))))
|
||||
|
|
Loading…
Add table
Reference in a new issue