The | junctions seem a lot like sets to me, though I guess there is a lot of fancy you can use. One that comes to mind is that you can pretend that it is a single value, even if it is a complex junction of & and | things:
> (5|4) + 1
any(6, 5)
> (5&4) + 1
all(6, 5)
> my $x = 5|4|3|2
any(5, 4, 3, 2)
> say "yep!" if $x + 2 ~~ 7
yep!
> ((2|3|4|5|6|7) & (3|4)) + 1 ~~ 5
True
> ((2|3|4|5|6|7) & (3|4)) + 1 ~~ 6
False
Kinda weird, especially & junctions. The docs[1] say "Junctions are meant to be used as matchers in boolean context; introspection of junctions is not supported. If you feel the urge to introspect a junction, use a Set or a related type instead."So far in my Perl 6 exploration I don't think I've used/needed junctions -- strikes me as a specific sort of use-case, but maybe familiarity would help me spot more (useful) opportunities.
[1] http://doc.perl6.org/type/Junction, though like all P6 docs needs more contributions