]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/math/combinatorics/combinatorics.factor
math.combinatorics: fix <k-permutations> for k=0
[factor.git] / basis / math / combinatorics / combinatorics.factor
index 113f7759d1802845a1aab02848eb52e4b0cebd44..771dda2624b307e025b4e2db1631151ee32092eb 100644 (file)
@@ -78,7 +78,7 @@ TUPLE: k-permutations length skip k seq ;
     seq length :> n
     n k nPk :> len
     {
-        { [ len k [ zero? ] either? ] [ { } ] }
+        { [ len zero? ] [ { } ] }
         { [ n k = ] [ seq <permutations> ] }
         [ len n factorial over /i k seq k-permutations boa ]
     } cond ;