Newsgroups: perl.perl6.language
From: l...@luqui.org (Luke Palmer)
Date: Mon, 18 Apr 2005 17:08:36 -0600
Local: Mon, Apr 18 2005 7:08 pm
Subject: Re: junction adverb: :except
David Christensen writes: No, you're abusing adverbs. You can't give an adverb to a variable > Hypothetical here: > If we want to calculate a set of values for a junction which map nicely > (Ignore for the moment the inefficiency of the choice of this > 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(). > my $j = 1|2|3|4; > Let me know if I'm totally abusing junctions here... (because adverbs don't modify actually nouns :-). I don't know if we've destroyed Damian's comparator semantic, but if not, then you can just do: my $k = ($j != 2); But if that no longer happens, it's best a method on the junction. Luke You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||