]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: change binary-reduce not to be row-polymorphic until #879 is fixed.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 6 May 2013 23:17:57 +0000 (16:17 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 6 May 2013 23:17:57 +0000 (16:17 -0700)
core/sequences/sequences-docs.factor
core/sequences/sequences.factor

index 9be1be260919df61803c74f61b543bfefe738f44..5e775230f85bcfdc6d1eb76ebac5532bfdbd0976 100644 (file)
@@ -1301,7 +1301,7 @@ HELP: collector
 
 HELP: binary-reduce
 { $values
-     { "seq" sequence } { "start" integer } { "quot" { $quotation "( ... elt1 elt2 -- ... newelt )" } }
+     { "seq" sequence } { "start" integer } { "quot" { $quotation "( elt1 elt2 -- newelt )" } }
      { "value" object } }
 { $description "Like " { $link reduce } ", but splits the sequence in half recursively until each sequence is small enough, and calls the quotation on these smaller sequences. If the quotation computes values that depend on the size of their input, such as bignum arithmetic, then this algorithm can be more efficient than using " { $link reduce } "." }
 { $examples "Computing factorial:"
index caaed80efaa50f65c2809b5b8524f33207419471..55e95c5cf8e4c5d1aa7acb758570fb19ccbc4b2d 100644 (file)
@@ -892,7 +892,7 @@ PRIVATE>
 : nth3-unsafe ( n seq -- a b c )
     [ nth2-unsafe ] [ [ 2 + ] dip nth-unsafe ] 2bi ; inline
 
-: (binary-reduce) ( ... seq start quot: ( ... elt1 elt2 -- ... newelt ) from length -- ... value )
+: (binary-reduce) ( seq start quot: ( elt1 elt2 -- newelt ) from length -- value )
     #! We can't use case here since combinators depends on
     #! sequences
     dup 4 < [
@@ -910,7 +910,7 @@ PRIVATE>
 
 PRIVATE>
 
-: binary-reduce ( ... seq start quot: ( ... elt1 elt2 -- ... newelt ) -- ... value )
+: binary-reduce ( seq start quot: ( elt1 elt2 -- newelt ) -- value )
     pick length 0 max 0 swap (binary-reduce) ; inline
 
 : cut ( seq n -- before after )