]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences.product: fix product-find.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 2 Dec 2020 16:03:37 +0000 (08:03 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 2 Dec 2020 16:05:54 +0000 (08:05 -0800)
basis/sequences/product/product.factor

index f5e6c668bd0b5ad333d6db8bcf25dd98bd0b532a..4ef9b5490a8d660330eb8ca03cdeebefbd5f3f91 100644 (file)
@@ -81,7 +81,7 @@ M: product-sequence nth
 
 :: product-find ( ... sequences quot: ( ... seq -- ... ? ) -- ... sequence )
     sequences start-product-iter :> ( ns lengths )
-    lengths [ 0 = ] any? [
+    lengths [ 0 = ] any? [ f ] [
         f [ ns lengths end-product-iter? over or ]
         [ drop ns sequences nths quot keep and ns lengths product-iter ] until
-    ] unless ; inline
+    ] if ; inline