From f6bdebb36bb76281efde305e58edbded4e89e872 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 18 Sep 2011 23:41:49 -0500 Subject: [PATCH] Revert "spread>quot now outputs empty quotations where you would expect so that things like { [ ] [ ] } spread infer as ( x x -- x x ) instead of ( -- )" This causes problems in bootstrap and in make-images. Revisit sometime in the future... This reverts commit 004b20df12745bd8feabcdde5b9ae2780dcb36ee. --- core/combinators/combinators-tests.factor | 6 +----- core/combinators/combinators.factor | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/combinators/combinators-tests.factor b/core/combinators/combinators-tests.factor index 3a8cc23811..97de07d546 100644 --- a/core/combinators/combinators-tests.factor +++ b/core/combinators/combinators-tests.factor @@ -1,6 +1,6 @@ USING: alien strings kernel math tools.test io prettyprint namespaces combinators words classes sequences accessors -math.functions arrays combinators.private stack-checker ; +math.functions arrays combinators.private ; IN: combinators.tests [ 3 ] [ 1 2 [ + ] call( x y -- z ) ] unit-test @@ -320,7 +320,3 @@ DEFER: corner-case-1 [ "nachos" ] [ 33 test-case-12 ] unit-test [ "nachos" ] [ 33 \ test-case-12 def>> call ] unit-test - -! Fixes #138 -[ { 3 3 } ] -[ [ { [ ] [ ] [ ] } spread ] [ inputs ] [ outputs ] bi 2array ] unit-test \ No newline at end of file diff --git a/core/combinators/combinators.factor b/core/combinators/combinators.factor index ace9b47aa1..fc259afbaf 100644 --- a/core/combinators/combinators.factor +++ b/core/combinators/combinators.factor @@ -66,7 +66,7 @@ SLOT: terminated? ! spread : spread>quot ( seq -- quot ) - [ ] [ [ [ dip ] curry ] dip append ] reduce ; + [ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ; : spread ( objs... seq -- ) spread>quot call ;