<commit_before>use v6;

# Specification:
#   P08 (**) Eliminate consecutive duplicates of list elements.
#       If a list contains repeated elements they should be replaced with a
#       single copy of the element. The order of the elements should not be
#       changed.
#
# Example:
# > say ~compress(<a a a a b c c a a d e e e e>)
# a b c a d e

die "Example doesn't yet work in Niecza" if $*VM ~~ 'niecza';

sub compress (@in) {
	my @return;
	my $last;
	for @in -> $i {
        FIRST { $last = '' }
		if ($i ne $last) {
			@return.push($i);
			$last = $i;
		}
	}
	return @return;
}<commit_msg>Replace hard tabs with spaces in P08-eric256<commit_after>use v6;

# Specification:
#   P08 (**) Eliminate consecutive duplicates of list elements.
#       If a list contains repeated elements they should be replaced with a
#       single copy of the element. The order of the elements should not be
#       changed.
#
# Example:
# > say ~compress(<a a a a b c c a a d e e e e>)
# a b c a d e

die "Example doesn't yet work in Niecza" if $*VM ~~ 'niecza';

sub compress (@in) {
    my @return;
    my $last;
    for @in -> $i {
        FIRST { $last = '' }
        if ($i ne $last) {
            @return.push($i);
            $last = $i;
        }
    }
    return @return;
}
{'fraction_non_alphanumeric': 0.12166405023547881, 'fraction_numerical': 0.008634222919937205, 'mean_word_length': 2.3641160949868074, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4480577', 'n_tokens_mistral': 456, 'n_tokens_neox': 433, 'n_words': 184}