[% setvar title More functions from set theory to manipulate arrays %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/


More functions from set theory to manipulate arrays


  Maintainer: Gael Pegliasco <gael.pegliasco@telecorporate.com>
  Date: 30 Aug 2000
  Mailing List: perl6-language@perl.org
  Number: 179
  Version: 1
  Status: Developing


When programming in perl we need really often to calculate union, intersection, difference between arrays. It will be cool if such functions could be part of the perl6 language.


Functions from Set theory are often needed when manipulating arrays, I'd like to to find most of them in the new perl6 language.

The most usefull and needed are, for me,

- union - intersection - difference

after we could find some others like :

- "unicity" to eliminate duplicated elements


I'd like to use these functions in this way :

 @c = union (@a, @b); 
 # wich is different from @c = (@a, @b) because union do not duplicate
 same elements

 @c = intersection (@a, @b);
 @c = diff(@a, @b);


Don't know what to put here.

Event loop


Set Theory