assocs: fix map>alist and docs.
parent
351f51b72e
commit
5dadf77311
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue