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.db4
parent
0bf5c6bf0f
commit
76c76b81ed
|
@ -310,11 +310,7 @@ M: lazy-append cdr ( lazy-append -- cdr )
|
||||||
lazy-append-list2 lappend ;
|
lazy-append-list2 lappend ;
|
||||||
|
|
||||||
M: lazy-append nil? ( lazy-append -- bool )
|
M: lazy-append nil? ( lazy-append -- bool )
|
||||||
dup lazy-append-list1 nil? [
|
drop f ;
|
||||||
lazy-append-list2 nil?
|
|
||||||
] [
|
|
||||||
drop f
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
M: lazy-append list? ( object -- bool )
|
M: lazy-append list? ( object -- bool )
|
||||||
drop t ;
|
drop t ;
|
||||||
|
|
Loading…
Reference in New Issue