]> gitweb.factorcode.org Git - factor.git/blobdiff - core/sequences/sequences.factor
Fix conflict
[factor.git] / core / sequences / sequences.factor
index 1ea93080e91acf5d876dc2414577fad13d39b63f..7560c8f73eddb5320a50bcf8a47d2d2a2f1b3333 100755 (executable)
@@ -718,3 +718,8 @@ PRIVATE>
         dup [ length ] map infimum
         swap [ [ nth-unsafe ] with { } map-as ] curry { } map-as
     ] unless ;
+
+: sigma ( seq quot -- n ) [ + ] compose 0 swap reduce ; inline
+
+: count ( seq quot -- n ) [ 1 0 ? ] compose sigma ; inline
+