From 266167625603c294dd21b9ee16db32823ddeb7f2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 9 Aug 2023 12:54:22 -0500 Subject: 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. --- chicanery.extras.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'chicanery.extras.scm') 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 @@ ;; This sections should be as small as possible (define (atom? x) - (not (pair? x))) + (and (not (pair? x)) + (not (null? x)))) (define read-port-chunk-size (make-parameter 512)) @@ -124,8 +125,8 @@ (write x port) (get-output-string port)))) -(define (print x) - (display x) +(define (print . xs) + (for-each display xs) (newline)) (define ->string displayed) -- cgit 1.4.1-21-gabe81