about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2023-08-09 12:54:22 -0500
committerCase Duckworth2023-08-09 12:54:22 -0500
commit266167625603c294dd21b9ee16db32823ddeb7f2 (patch)
treea36ccfb58c6c6c5c136cbf9d1197dfdeb160db2f
parentCorrect line endings (diff)
downloadchicanery-266167625603c294dd21b9ee16db32823ddeb7f2.tar.gz
chicanery-266167625603c294dd21b9ee16db32823ddeb7f2.zip
Correct definition of atom?
Honestly `atom?` is a weird thing to think about. Is a vector an atom? A bytevector? A string is also a collection .. so it's confusing, isn't it.
-rw-r--r--chicanery.extras.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/chicanery.extras.scm b/chicanery.extras.scm index bbd044f..dac823f 100644 --- a/chicanery.extras.scm +++ b/chicanery.extras.scm
@@ -75,7 +75,8 @@
75;; This sections should be as small as possible 75;; This sections should be as small as possible
76 76
77(define (atom? x) 77(define (atom? x)
78 (not (pair? x))) 78 (and (not (pair? x))
79 (not (null? x))))
79 80
80(define read-port-chunk-size 81(define read-port-chunk-size
81 (make-parameter 512)) 82 (make-parameter 512))
@@ -124,8 +125,8 @@
124 (write x port) 125 (write x port)
125 (get-output-string port)))) 126 (get-output-string port))))
126 127
127(define (print x) 128(define (print . xs)
128 (display x) 129 (for-each display xs)
129 (newline)) 130 (newline))
130 131
131(define ->string displayed) 132(define ->string displayed)