Hypothetical here:

If we want to calculate a set of values for a junction which map nicely to a range with a few outliers, would it be possibly to have a qualifier :except which allows us to make exceptions to our given range? I.e.,

(Ignore for the moment the inefficiency of the choice of this particular algorithm.)

my $year = 1900;  # or whatever

my $leap_year = $year % 400 == any(0..400 :by(4) :except(100,200,300));

Here except would be a modifier on the range being generated for any(). I could also see except being used to "strip choices" from junctions:

my $j = 1|2|3|4;
my $k=$j :except(2);  # 1|3|4

Let me know if I'm totally abusing junctions here...

David



Reply via email to