]> gitweb.factorcode.org Git - factor.git/commitdiff
sets: fix stack effect for gather.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 7 Dec 2020 20:45:09 +0000 (12:45 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 7 Dec 2020 20:45:09 +0000 (12:45 -0800)
core/sets/sets-docs.factor
core/sets/sets.factor

index b622aba3ce2ad47f10959863277b34c1ab85ab84..c2de07b06c72452fe70821270c45c09b09e3d2b0 100644 (file)
@@ -198,9 +198,9 @@ HELP: set=
 
 HELP: gather
 { $values
-     { "seq" sequence } { "quot" quotation }
+     { "seq" sequence } { "quot" { $quotation ( ... elt -- ... elts ) } }
      { "newseq" sequence } }
-{ $description "Maps a quotation onto a sequence, concatenates the results of the mapping, and removes duplicates." } ;
+{ $description "Maps a quotation over a sequence, concatenates the results of the mapping, and removes duplicates." } ;
 
 HELP: set-like
 { $values { "set" set } { "exemplar" set } { "set'" set } }
index 9e8f3da46e77538d65ff95d58c29887fb4e2f71b..2d0f6762638cb3eee0a3987f5fab64e40a8f6500 100644 (file)
@@ -141,7 +141,7 @@ M: sequence clear-set
 : refine ( sets -- set/f )
     [ f ] [ [ ] [ intersect ] map-reduce ] if-empty ;
 
-: gather ( ... seq quot: ( ... elt -- ... elt' ) -- ... newseq )
+: gather ( ... seq quot: ( ... elt -- ... elts ) -- ... newseq )
     map concat members ; inline
 
 : adjoin-at ( value key assoc -- )