Max Alekseyev on Wed, 04 Dec 2024 17:34:41 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: setunion() on a vector of sets |
On Wed, Dec 04, 2024 at 09:50:39AM -0500, Max Alekseyev wrote:
> Can setunion() be extended to support a vector of arguments, like gcd() and
> other functions?
You can use fold:
? fold(setunion,[[1,2,3],[2,3,4],[4,5,6]])
%2 = [1,2,3,4,5,6]
Cheers,
Bill.