From 76c76b81ed2c92b44ac0ac40a87418410a7df847 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 27 Dec 2007 03:42:19 +0100 Subject: [PATCH] Simplify lazy-append nil? word lazy-append tuples are always built using lappend. If list1 is nil, then list2 is returned, hence nil? on a lazy-append object is always false. --- extra/lazy-lists/lazy-lists.factor | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extra/lazy-lists/lazy-lists.factor b/extra/lazy-lists/lazy-lists.factor index daf02eef22..c42daabc05 100644 --- a/extra/lazy-lists/lazy-lists.factor +++ b/extra/lazy-lists/lazy-lists.factor @@ -310,11 +310,7 @@ M: lazy-append cdr ( lazy-append -- cdr ) lazy-append-list2 lappend ; M: lazy-append nil? ( lazy-append -- bool ) - dup lazy-append-list1 nil? [ - lazy-append-list2 nil? - ] [ - drop f - ] if ; + drop f ; M: lazy-append list? ( object -- bool ) drop t ;