From 530a3eb5e86a388fbe379e93ee5bb9768a017ff1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 25 Jan 2010 13:33:42 +0000 Subject: [PATCH] change R5RS to allow splicing unquote at tail when expression is not a list; merge to 4.2.4 svn: r17811 --- collects/r5rs/main.ss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/r5rs/main.ss b/collects/r5rs/main.ss index 6e48ff2b52..6fe8f966fd 100644 --- a/collects/r5rs/main.ss +++ b/collects/r5rs/main.ss @@ -209,7 +209,9 @@ form)] [((unquote-splicing e) . rest) (if (zero? depth) - #`(mappend e #,(loop #'rest depth)) + (if (null? (syntax-e #'rest)) + #'e ;; Note: we're not check for a list + #`(mappend e #,(loop #'rest depth))) #`(mcons (mcons 'unquote-splicing #,(loop #'(e) (sub1 depth))) #,(loop #'rest depth)))]