<commit_before>class IO is also {

    multi method close() is export {
        try {
            ?$!PIO.close()
        }
        $! ?? fail($!) !! Bool::True
    }

    multi method eof() is export {
        return ?$!PIO.eof();
    }

    multi method ins() {
        return $!ins;
    }

    multi method lines($limit = *) is export {
        my @result;
        my $l = $limit ~~ Whatever ?? Inf !! $limit;
        while !$.eof && $l-- > 0 {
            push @result, $!PIO.readline().chomp()
        }
        return @result;
    }

    multi method print(*@items) {
        try {
            for @items -> $item {
                $!PIO.print($item);
            }
        }
        return $! ?? fail($!) !! Bool::True;
    }

    multi method printf($format, *@args) {
        return self.print(sprintf($format, |@args));
    }

    multi method say(*@items) {
        self.print(@items, "\n");
    }

    multi method slurp() is export {
        return $!PIO.readall();
    }

}

multi sub lines(IO $filehandle,
                :$bin = False,<commit_msg>Don't export IO.slurp yet either.<commit_after>class IO is also {

    multi method close() is export {
        try {
            ?$!PIO.close()
        }
        $! ?? fail($!) !! Bool::True
    }

    multi method eof() is export {
        return ?$!PIO.eof();
    }

    multi method ins() {
        return $!ins;
    }

    multi method lines($limit = *) is export {
        my @result;
        my $l = $limit ~~ Whatever ?? Inf !! $limit;
        while !$.eof && $l-- > 0 {
            push @result, $!PIO.readline().chomp()
        }
        return @result;
    }

    multi method print(*@items) {
        try {
            for @items -> $item {
                $!PIO.print($item);
            }
        }
        return $! ?? fail($!) !! Bool::True;
    }

    multi method printf($format, *@args) {
        return self.print(sprintf($format, |@args));
    }

    multi method say(*@items) {
        self.print(@items, "\n");
    }

    multi method slurp() {
        return $!PIO.readall();
    }

}

multi sub lines(IO $filehandle,
                :$bin = False,
{'fraction_non_alphanumeric': 0.16447985004686036, 'fraction_numerical': 0.0009372071227741331, 'mean_word_length': 1.5326215895610913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5350308', 'n_tokens_mistral': 689, 'n_tokens_neox': 673, 'n_words': 167}