sequences: remove (indices).
parent
ce9c9a8858
commit
f0251cb2ad
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue