]> gitweb.factorcode.org Git - factor.git/blobdiff - core/arrays/arrays.factor
add if-zero/when-zero/unless-zero to core/ and update usages
[factor.git] / core / arrays / arrays.factor
index 4a998a1ebb118d7e15a9bcb4f04681ff640d0471..dd70e45b6b15eb485dacb804bad7e5c88fb8ac65 100644 (file)
@@ -14,7 +14,7 @@ M: array resize resize-array ;
 
 M: object new-sequence drop 0 <array> ;
 
-M: f new-sequence drop dup zero? [ drop f ] [ 0 <array> ] if ;
+M: f new-sequence drop [ f ] [ 0 <array> ] if-zero ;
 
 M: array equal?
     over array? [ sequence= ] [ 2drop f ] if ;