sequences: removing 2unclip-slice.

db4
John Benediktsson 2011-10-02 09:26:20 -07:00
parent aa4e65ef6f
commit 0fb43fb864
2 changed files with 0 additions and 13 deletions

View File

@ -1220,16 +1220,6 @@ HELP: 2selector
{ "selector" quotation } { "accum1" vector } { "accum2" vector } }
{ $description "Creates two new vectors to accumulate values based on a predicate. The first vector accumulates values for which the predicate yields true; the second for false." } ;
HELP: 2unclip-slice
{ $values
{ "seq1" sequence } { "seq2" sequence }
{ "rest-slice1" sequence } { "rest-slice2" sequence } { "first1" object } { "first2" object } }
{ $description "Unclips the first element of each sequence and leaves two slice elements and the two unclipped objects on the stack." }
{ $examples { $example "USING: sequences prettyprint kernel arrays ;"
"{ 1 2 } { 3 4 } 2unclip-slice 4array [ . ] each"
"T{ slice { from 1 } { to 2 } { seq { 1 2 } } }\nT{ slice { from 1 } { to 2 } { seq { 3 4 } } }\n1\n3"
} } ;
HELP: collector
{ $values
{ "quot" quotation }

View File

@ -867,9 +867,6 @@ PRIVATE>
: unclip-slice ( seq -- rest-slice first )
[ rest-slice ] [ first-unsafe ] bi ; inline
: 2unclip-slice ( seq1 seq2 -- rest-slice1 rest-slice2 first1 first2 )
[ unclip-slice ] bi@ swapd ; inline
: map-reduce ( ..a seq map-quot: ( ..a x -- ..b elt ) reduce-quot: ( ..b prev elt -- ..a next ) -- ..a result )
[ [ unclip-slice ] dip [ call ] keep ] dip
compose reduce ; inline