sequences: remove (indices).
							parent
							
								
									ce9c9a8858
								
							
						
					
					
						commit
						f0251cb2ad
					
				| 
						 | 
				
			
			@ -635,16 +635,10 @@ PRIVATE>
 | 
			
		|||
: last-index-from ( obj i seq -- n )
 | 
			
		||||
    rot [ = ] curry find-last-from drop ;
 | 
			
		||||
 | 
			
		||||
<PRIVATE
 | 
			
		||||
 | 
			
		||||
: (indices) ( elt i obj accum -- )
 | 
			
		||||
    [ swap [ = ] dip ] dip [ push ] 2curry when ; inline
 | 
			
		||||
 | 
			
		||||
PRIVATE>
 | 
			
		||||
 | 
			
		||||
: indices ( obj seq -- indices )
 | 
			
		||||
    swap V{ } clone
 | 
			
		||||
    [ [ (indices) ] 2curry each-index ] keep ;
 | 
			
		||||
    swap [ = ] curry [ swap ] prepose V{ } clone [
 | 
			
		||||
        [ push ] curry [ [ drop ] if ] curry compose each-index
 | 
			
		||||
    ] keep ;
 | 
			
		||||
 | 
			
		||||
<PRIVATE
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue