From 7103dfab6b6aeb394e334bc7d936904b63a12d37 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 21 Sep 2011 19:31:26 -0700 Subject: [PATCH] infix: using "if-empty" makes it cleaner. --- extra/infix/infix.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/infix/infix.factor b/extra/infix/infix.factor index 1945b2e906..2cfdbf1080 100644 --- a/extra/infix/infix.factor +++ b/extra/infix/infix.factor @@ -82,10 +82,10 @@ M: bad-stack-effect summary [ 1quotation compose ] [ bad-stack-effect ] if ; : arguments-codegen ( seq -- quot ) - dup empty? [ drop [ ] ] [ + [ [ ] ] [ [ infix-codegen prepare-operand ] [ compose ] map-reduce - ] if ; + ] if-empty ; M: ast-function infix-codegen [ arguments>> [ arguments-codegen ] [ length ] bi ]