Almost a year ago (2005-04-27), I wrote the list asking a question about junctions. Specifically, the ability to find the intersection, union, etc of a list.
my $matches = any( @x_chars ) eq any( @y_chars ); my $match = $matches.pick; all( any() eq any() ); Patrick Michaud offered an infix myeq to let the problem be solved in user space as junctions at that time did not support what I wanted to do. Today I examined the Synopses and found a couple of intriguing things: In Synopsis 3: "A junction is a single value that is equivalent to multiple values." And then later on... "Junctions are specifically unordered. So if you say for all(@foo) {...} it indicates to the compiler that there is no coupling between loop iterations and they can be run in any order or even in parallel." This implies to me that it is possible to get the values out of a junction without calling a .values method if used in list context. >From Synopsis 12: "To hyperoperate over the values of a junction you have to explicitly pull out the values: $junction.values».meth(@args);" This implies to me that you can still get at the values by explicitly using .values. >From Synopsis 9: "Some contexts, such as boolean contexts, have special rules for dealing with junctions. In any scalar context not expecting a junction of values, a junction produces automatic parallelization of the algorithm." Ok, so what about a context expecting a junction of values as I think all( any() eq any() ) is expecting? My question today is 2 fold. 1. Where in the synopses would I find the various methods that can be performed on a junction? A. .values B. .pick C. ??? 2. Do the junctions of today support finding the union, intersection, etc without creating your own infix operator? Cheers, Joshua Gatcomb a.k.a. Limbic~Region