sets: document combine word
parent
d2b20ddb35
commit
0b52600143
|
@ -190,3 +190,7 @@ HELP: null?
|
|||
HELP: cardinality
|
||||
{ $values { "set" set } { "n" "a non-negative integer" } }
|
||||
{ $description "Returns the number of elements in the set. All sets support this operation." } ;
|
||||
|
||||
HELP: combine
|
||||
{ $values { "seq" "a sequence of sets" } { "set" set } }
|
||||
{ $description "Outputs the union of a sequence of sets, or " { $link f } " if the sequence is empty." } ;
|
||||
|
|
|
@ -109,7 +109,7 @@ M: sequence null?
|
|||
M: sequence cardinality
|
||||
length ;
|
||||
|
||||
: combine ( sets -- set/f )
|
||||
: combine ( sets -- set )
|
||||
[ f ]
|
||||
[ [ [ members ] map concat ] [ first ] bi set-like ]
|
||||
if-empty ;
|
||||
|
|
Loading…
Reference in New Issue