]> gitweb.factorcode.org Git - factor.git/commitdiff
assocs: fix map>alist and docs.
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 12 Aug 2015 13:48:33 +0000 (08:48 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 12 Aug 2015 13:48:33 +0000 (08:48 -0500)
core/assocs/assocs-docs.factor
core/assocs/assocs.factor

index 31df46f52c4650f0a8913c1941ce291f612699d1..2320768f596c0e2295164c37ac1461f4af19536d 100644 (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
index eb64445798e7a193e19e46e5e89c13ec57bff0ab..9e82bc817b17778aeb2654bb3d38619e547a65fb 100644 (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 )