<commit_before>class Range is Iterable does Positional {
    has $.min;
    has $.excludes_min = Bool::False;
    has $.max;
    has $.excludes_max = Bool::False;

    multi method new($min,
                     $max,
                     Bool :$excludes_min = Bool::False,
                     Bool :$excludes_max = Bool::False) {
        self.bless(*, :min($min),
                      :max($max),
                      :excludes_min($excludes_min),
                      :excludes_max($excludes_max));
    }

    our Bool multi method ACCEPTS(Range $topic) {
        ?(($.min == $topic.min)
          && ($.max == $topic.max)
          && ($.excludes_min == $topic.excludes_min)
          && ($.excludes_max == $topic.excludes_min));
    }

    our method iterator() {
        my $start = $.min;
        $start .= succ if $.excludes_min;
        RangeIter.new( :value( self!max_test($start) ?? $start !! EMPTY ),
                       :max($.max), 
                       :excludes_max($.excludes_max));
    }

    my Bool multi method !min_test($topic) {
        $.min before $topic || (!$.excludes_min && !($.min after $topic));
    }<commit_msg>Have Range.new change Whatever to +/- Inf, as per Spec and TimToday.<commit_after>class Range is Iterable does Positional {
    has $.min;
    has $.excludes_min = Bool::False;
    has $.max;
    has $.excludes_max = Bool::False;

    multi method new($min,
                     $max,
                     Bool :$excludes_min = Bool::False,
                     Bool :$excludes_max = Bool::False) {
        self.bless(*, :min($min ~~ Whatever ?? -Inf !! $min),
                      :max($max ~~ Whatever ?? Inf !! $max),
                      :excludes_min($excludes_min),
                      :excludes_max($excludes_max));
    }

    our Bool multi method ACCEPTS(Range $topic) {
        ?(($.min == $topic.min)
          && ($.max == $topic.max)
          && ($.excludes_min == $topic.excludes_min)
          && ($.excludes_max == $topic.excludes_min));
    }

    our method iterator() {
        my $start = $.min;
        $start .= succ if $.excludes_min;
        RangeIter.new( :value( self!max_test($start) ?? $start !! EMPTY ),
                       :max($.max), 
                       :excludes_max($.excludes_max));
    }

    my Bool multi method !min_test($topic) {
        $.min before $topic || (!$.excludes_min && !($.min after $topic));
    }
{'fraction_non_alphanumeric': 0.15865782932891467, 'fraction_numerical': 0.0, 'mean_word_length': 1.728813559322034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5478148', 'n_tokens_mistral': 798, 'n_tokens_neox': 721, 'n_words': 164}