assocs: fix map>alist and docs.

db4
Doug Coleman 2015-08-12 08:48:33 -05:00
parent 351f51b72e
commit 5dadf77311
2 changed files with 2 additions and 2 deletions

View File

@ -473,7 +473,7 @@ HELP: map>assoc
{ $description "Applies the quotation to each element of the sequence, and collects the keys and values into a new assoc having the same type as " { $snippet "exemplar" } "." } ;
HELP: map>alist
{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... key value ) } } { "assoc" "a new assoc" } }
{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... key value ) } } { "alist" "a new alist" } }
{ $description "Applies the quotation to each element of the sequence, and collects the keys and values into a new alist." } ;
{ map>assoc map>alist } related-words

View File

@ -201,7 +201,7 @@ M: assoc values [ nip ] { } assoc>map ;
[ [ swapd set-at ] curry compose each ] keep
] if ; inline
: map>alist ( ... seq quot: ( ... elt -- ... key value ) exemplar -- ... alist )
: map>alist ( ... seq quot: ( ... elt -- ... key value ) -- ... alist )
{ } map>assoc ; inline
: extract-keys ( seq assoc -- subassoc )