]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences.extras: removing a couple words that aren't used.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 29 Dec 2016 20:03:16 +0000 (12:03 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 29 Dec 2016 20:03:16 +0000 (12:03 -0800)
extra/sequences/extras/extras-docs.factor
extra/sequences/extras/extras.factor

index 57a534b05ae7ed613ee7b8ee453af82e39a1be20..9f1b4979ca718d60217ffd9848d1fbc78416e2b2 100644 (file)
@@ -69,13 +69,6 @@ HELP: compact
     "Collapse multiple spaces in a string down to a single space"
     { $example "USING: kernel prettyprint sequences.extras ;" "\"   Hello,    crazy    world   \" [ CHAR: \\s = ] \" \" compact ." "\"Hello, crazy world\"" } } ;
 
-HELP: combos
-{ $values
-    { "list1" sequence }
-    { "list2" sequence }
-    { "result" sequence } }
-{ $description "Returns all combinations of the first sequence with the second sequence.  The result is not uniquified: if the sequences contain duplicate elements, then the same pair may appear multiple times in the result sequence." } ;
-
 HELP: <evens>
 { $values { "seq" sequence } { "evens" evens } }
 { $description "Create a virtual sequence whose elements consist of the even-indexed elements from the original sequence." }
index aa901bd808d1dba90aaf10c8b0a7c428f1edc9fe..0a80c74c2f6f6e1341cf78be2abe2b41ce3cdc16 100644 (file)
@@ -4,23 +4,6 @@ sequences sequences.deep sequences.private sorting splitting
 vectors ;
 IN: sequences.extras
 
-: reduce1 ( seq quot -- result ) [ unclip ] dip reduce ; inline
-
-:: reduce-r ( seq identity quot: ( obj1 obj2 -- obj ) -- result )
-    seq [ identity ] [
-        unclip [ identity quot reduce-r ] [ quot call ] bi*
-    ] if-empty ; inline recursive
-
-! Quot must have static stack effect, unlike "reduce"
-:: reduce* ( seq identity quot: ( prev elt -- next ) -- result )
-    seq [ identity ] [
-        unclip identity swap quot call( prev elt -- next )
-        quot reduce*
-    ] if-empty ; inline recursive
-
-:: combos ( list1 list2 -- result )
-    list2 [ [ 2array ] curry list1 swap map ] map concat ;
-
 : find-all ( ... seq quot: ( ... elt -- ... ? ) -- ... elts )
     [ <enum> ] dip '[ nip @ ] assoc-filter ; inline