From abffefbe00ce7d8dc52b9fd08c65b1741c3e6636 Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Wed, 25 Jan 2012 01:48:51 -0800 Subject: [PATCH] Fix typo, clean up. --- src/runtime/unsyn.scm | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/runtime/unsyn.scm b/src/runtime/unsyn.scm index a489427b2..e7f3cedd3 100644 --- a/src/runtime/unsyn.scm +++ b/src/runtime/unsyn.scm @@ -376,23 +376,21 @@ USA. (unscan-defines auxiliary declarations body)))))) (define (unsyntax-lambda-body body) - (cond ((open-block? body) - (open-block-components body - (lambda (names declarations open-block-body) - (let ((unscanned (unscan-defines names declarations open-block-body))) - (if (sequence? unscanned) - (unsyntax-lambda-body-sequence unscanned) - (list (unsyntax-object unscanned))))))) - ((sequence? body) (unsyntax-lambda-body-sequence sequence)) - (else (list (unsyntax-object body))))) - -(define (unsyntax-lambda-body-sequence sequence) - (guarantee-sequence sequence 'unsyntax-lambda-body-sequence) - (let ((first-action (sequence-first sequence))) - (if (block-declaration? first-action) - `((DECLARE ,@(block-declaration-text first-action)) - ,@(unsyntax-sequence (sequence-second sequence))) - (unsyntax-sequence sequence)))) + (if (open-block? body) + (open-block-components body + (lambda (names declarations open-block-body) + (unsyntax-lambda-body-sequence + (unscan-defines names declarations open-block-body)))) + (unsyntax-lambda-body-sequence body))) + +(define (unsyntax-lambda-body-sequence body) + (if (sequence? body) + (let ((first-action (sequence-first body))) + (if (block-declaration? first-action) + `((DECLARE ,@(block-declaration-text first-action)) + ,@(unsyntax-sequence (sequence-second body))) + (unsyntax-sequence body))) + (list (unsyntax-object body)))) ;;;; Combinations -- 2.25.1