From a78d3f0b23d5efe47c83f42b78b6bdf4134f9f1a Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 11 Nov 2009 15:50:20 -0600 Subject: [PATCH] '[ ] should make an empty quot --- basis/fry/fry-tests.factor | 2 ++ basis/fry/fry.factor | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/basis/fry/fry-tests.factor b/basis/fry/fry-tests.factor index 10d9b282ad..f33eb276a0 100644 --- a/basis/fry/fry-tests.factor +++ b/basis/fry/fry-tests.factor @@ -5,6 +5,8 @@ IN: fry.tests SYMBOLS: a b c d e f g h ; +[ [ ] ] [ '[ ] ] unit-test +[ [ + ] ] [ '[ + ] ] unit-test [ [ 1 ] ] [ 1 '[ _ ] ] unit-test [ [ 1 ] ] [ [ 1 ] '[ @ ] ] unit-test [ [ 1 2 ] ] [ [ 1 ] [ 2 ] '[ @ @ ] ] unit-test diff --git a/basis/fry/fry.factor b/basis/fry/fry.factor index 931397e933..e58253692f 100644 --- a/basis/fry/fry.factor +++ b/basis/fry/fry.factor @@ -136,10 +136,12 @@ TUPLE: dredge-fry-state PRIVATE> M: callable fry ( quot -- quot' ) - 0 swap - [ dredge-fry ] [ - [ prequot>> >quotation ] - [ quot>> >quotation shallow-fry ] bi append - ] bi ; + [ [ [ ] ] ] [ + 0 swap + [ dredge-fry ] [ + [ prequot>> >quotation ] + [ quot>> >quotation shallow-fry ] bi append + ] bi + ] if-empty ; SYNTAX: '[ parse-quotation fry append! ;