From 7d93d1bf8cc4ea4f4b48531554c414c55d11e916 Mon Sep 17 00:00:00 2001 From: Joe Marshall Date: Sat, 21 Jan 2012 09:32:33 -0800 Subject: [PATCH] Remove SEQUENCE-3 (forgot to commit this one). --- src/runtime/scomb.scm | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/runtime/scomb.scm b/src/runtime/scomb.scm index 3e214db2e..40813256f 100644 --- a/src/runtime/scomb.scm +++ b/src/runtime/scomb.scm @@ -137,32 +137,21 @@ USA. (loop (cdr actions)))))) (define (sequence? object) - (or (object-type? (ucode-type sequence-2) object) - (object-type? (ucode-type sequence-3) object))) + (object-type? (ucode-type sequence-2) object)) (define-guarantee sequence "SCode sequence") (define (sequence-actions expression) - (cond ((object-type? (ucode-type sequence-2) expression) - (append! (sequence-actions (&pair-car expression)) - (sequence-actions (&pair-cdr expression)))) - ((object-type? (ucode-type sequence-3) expression) - (append! (sequence-actions (&triple-first expression)) - (sequence-actions (&triple-second expression)) - (sequence-actions (&triple-third expression)))) - (else - (list expression)))) + (if (object-type? (ucode-type sequence-2) expression) + (append! (sequence-actions (&pair-car expression)) + (sequence-actions (&pair-cdr expression))) + (list expression))) (define (sequence-immediate-actions expression) - (cond ((object-type? (ucode-type sequence-2) expression) - (list (&pair-car expression) - (&pair-cdr expression))) - ((object-type? (ucode-type sequence-3) expression) - (list (&triple-first expression) - (&triple-second expression) - (&triple-third expression))) - (else - (error:not-sequence expression 'SEQUENCE-IMMEDIATE-ACTIONS)))) + (if (object-type? (ucode-type sequence-2) expression) + (list (&pair-car expression) + (&pair-cdr expression)) + (error:not-sequence expression 'SEQUENCE-IMMEDIATE-ACTIONS))) (define (sequence-components expression receiver) (receiver (sequence-actions expression))) -- 2.25.1