sequences: remove (indices).

char-rename
John Benediktsson 2016-12-28 16:40:27 -08:00
parent ce9c9a8858
commit f0251cb2ad
1 changed files with 3 additions and 9 deletions

View File

@ -635,16 +635,10 @@ PRIVATE>
: last-index-from ( obj i seq -- n ) : last-index-from ( obj i seq -- n )
rot [ = ] curry find-last-from drop ; rot [ = ] curry find-last-from drop ;
<PRIVATE
: (indices) ( elt i obj accum -- )
[ swap [ = ] dip ] dip [ push ] 2curry when ; inline
PRIVATE>
: indices ( obj seq -- indices ) : indices ( obj seq -- indices )
swap V{ } clone swap [ = ] curry [ swap ] prepose V{ } clone [
[ [ (indices) ] 2curry each-index ] keep ; [ push ] curry [ [ drop ] if ] curry compose each-index
] keep ;
<PRIVATE <PRIVATE