sequences.extras: adding map-index!.
parent
2e9c20a12e
commit
3f11990452
|
@ -224,3 +224,6 @@ PRIVATE>
|
||||||
[ find ] 2keep rot [
|
[ find ] 2keep rot [
|
||||||
[ 1 + ] 2dip find-from drop not
|
[ 1 + ] 2dip find-from drop not
|
||||||
] [ 3drop f ] if ; inline
|
] [ 3drop f ] if ; inline
|
||||||
|
|
||||||
|
: map-index! ( ... seq quot: ( ... elt index -- ... newelt ) -- ... seq )
|
||||||
|
over [ [ (each-index) ] dip collect ] keep ; inline
|
||||||
|
|
Loading…
Reference in New Issue