implementing symbol->string in C to avoid outputting the escape syntax

This commit is contained in:
Alex Shinn 2011-11-27 22:37:14 +09:00
parent a5fbdccbfc
commit 61a65ae219

View file

@ -400,9 +400,6 @@
"0" "0"
(list->string (if (negative? num) (cons #\- res) res))))))) (list->string (if (negative? num) (cons #\- res) res)))))))
(define (symbol->string sym)
(call-with-output-string (lambda (out) (write sym out))))
(define (list->string ls) (define (list->string ls)
(call-with-output-string (call-with-output-string
(lambda (out) (for-each (lambda (ch) (write-char ch out)) ls)))) (lambda (out) (for-each (lambda (ch) (write-char ch out)) ls))))