Fix documentation for map-index

db4
Slava Pestov 2009-04-04 20:22:49 -05:00
parent 1040426565
commit d707292d84
2 changed files with 2 additions and 2 deletions

View File

@ -311,7 +311,7 @@ HELP: each-index
HELP: map-index
{ $values
{ "seq" sequence } { "quot" quotation } }
{ "seq" sequence } { "quot" quotation } { "newseq" sequence } }
{ $description "Calls the quotation with the element of the sequence and its index on the stack, with the index on the top of the stack. Collects the outputs of the quotation and outputs them in a sequence of the same type as the input sequence." }
{ $examples { $example "USING: sequences prettyprint math ;"
"{ 10 20 30 } [ + ] map-index ."

View File

@ -506,7 +506,7 @@ PRIVATE>
[ [ 0 = ] 2dip if ] 2curry
each-index ; inline
: map-index ( seq quot -- )
: map-index ( seq quot -- newseq )
prepare-index 2map ; inline
: reduce-index ( seq identity quot -- )