Skip to content

Commit

Permalink
Make Range!min_test and Range!max_test use after and before rather th…
Browse files Browse the repository at this point in the history
…an lt and gt.
  • Loading branch information
colomon committed Feb 9, 2010
1 parent 057d093 commit 81273d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Range.pm
Expand Up @@ -27,15 +27,15 @@ class Range is Iterable {
}

my Bool multi method !min_test($topic) {
$.min lt $topic || (!$.excludes_min && $.min eq $topic);
$.min before $topic || (!$.excludes_min && !($.min after $topic));
}

our Bool multi method max_test($topic) {
$topic lt $.max || (!$.excludes_max && $.max eq $topic);
my Bool multi method !max_test($topic) {
$topic before $.max || (!$.excludes_max && !($topic after $.max));
}

our Bool multi method ACCEPTS($topic) {
?(self!min_test($topic) && self.max_test($topic))
?(self!min_test($topic) && self!max_test($topic))
}

multi method minmax() {
Expand Down

0 comments on commit 81273d8

Please sign in to comment.