From 195cbeca6d489ad1ae905ee1bf68ed84781f5f9e Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 3 Nov 2012 23:37:41 +0900 Subject: [PATCH] Fixing unquote-splicing in srfi-38. --- lib/srfi/38.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/srfi/38.scm b/lib/srfi/38.scm index a429c296..a25e96f9 100644 --- a/lib/srfi/38.scm +++ b/lib/srfi/38.scm @@ -161,8 +161,8 @@ (if (and (not (eof-object? c)) (or (char-numeric? c) (memv (char-downcase c) '(#\a #\b #\c #\d #\e #\f)))) - (read-label (cons (read-char in) res)) - (list->string (reverse res))))) + (read-label (cons (read-char in) res)) + (list->string (reverse res))))) (define (read-number base) (let* ((str (read-label '())) (n (string->number str base)) @@ -344,10 +344,10 @@ ((#\`) (read-char in) (list 'quasiquote (read-one))) ((#\,) (read-char in) - (list (if (eqv? #\@ (peek-char in)) - (begin (read-char in) 'unquote-splicing) - 'unquote) - (read-one))) + (let ((sym (if (eqv? #\@ (peek-char in)) + (begin (read-char in) 'unquote-splicing) + 'unquote))) + (list sym (read-one)))) (else (read in)))) ;; body