|
|
@ -3,12 +3,14 @@
|
|
|
|
(provide (all-defined-out))
|
|
|
|
(provide (all-defined-out))
|
|
|
|
|
|
|
|
|
|
|
|
;; read "foo bar" the same way as "(foo bar)"
|
|
|
|
;; read "foo bar" the same way as "(foo bar)"
|
|
|
|
;; other "bar" is dropped, which is too astonishing
|
|
|
|
;; otherwise "bar" is dropped, which is too astonishing
|
|
|
|
(define (string->datum str)
|
|
|
|
(define (string->datum str)
|
|
|
|
(let ([result (read (open-input-string (format "(~a)" str)))])
|
|
|
|
(if (positive? (string-length str))
|
|
|
|
(if (= (length result) 1)
|
|
|
|
(let ([result (read (open-input-string (format "(~a)" str)))])
|
|
|
|
(car result)
|
|
|
|
(if (= (length result) 1)
|
|
|
|
result)))
|
|
|
|
(car result)
|
|
|
|
|
|
|
|
result))
|
|
|
|
|
|
|
|
(void)))
|
|
|
|
|
|
|
|
|
|
|
|
#;(define-syntax format-datum
|
|
|
|
#;(define-syntax format-datum
|
|
|
|
(λ(stx)
|
|
|
|
(λ(stx)
|
|
|
|