<commit_before>my role QuantHash does Associative {

    method keyof() { Mu }
    method item() is raw { my $ = self }

    method SET-SELF(QuantHash:D: \elems) is implementation-detail {
        nqp::bindattr(self,::?CLASS,'$!elems',elems)
          if nqp::elems(elems);
        self
    }

    # provide a proto for QuantHashes from here
    proto method STORE(|) {*}
    multi method STORE(QuantHash:D: |) {     # for immutable types
        X::Assignment::RO.new(value => self).throw
    }

    method Int     ( --> Int:D)     { self.total.Int }
    method Num     ( --> Num:D)     { self.total.Num }
    method Numeric ( --> Numeric:D) { self.total.Numeric }
    method Real    ( --> Real:D)    { self.total.Real }

    method Capture() { self.Hash.Capture }

    multi method list(QuantHash:U:) { self.Any::list }
    multi method list(QuantHash:D:) { self.pairs.cache }<commit_msg>Remove redundant multi method list<commit_after>my role QuantHash does Associative {

    method keyof() { Mu }
    method item() is raw { my $ = self }

    method SET-SELF(QuantHash:D: \elems) is implementation-detail {
        nqp::bindattr(self,::?CLASS,'$!elems',elems)
          if nqp::elems(elems);
        self
    }

    # provide a proto for QuantHashes from here
    proto method STORE(|) {*}
    multi method STORE(QuantHash:D: |) {     # for immutable types
        X::Assignment::RO.new(value => self).throw
    }

    method Int     ( --> Int:D)     { self.total.Int }
    method Num     ( --> Num:D)     { self.total.Num }
    method Numeric ( --> Numeric:D) { self.total.Numeric }
    method Real    ( --> Real:D)    { self.total.Real }

    method Capture() { self.Hash.Capture }

    multi method list(QuantHash:D:) { self.pairs.cache }
{'fraction_non_alphanumeric': 0.14375715922107674, 'fraction_numerical': 0.0, 'mean_word_length': 2.438976377952756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7357862', 'n_tokens_mistral': 584, 'n_tokens_neox': 564, 'n_words': 136}