<commit_before>use v6;

<A C G T>.map({ +.comb(/$^symbol/) }).say given slurp;
=begin pod

=TITLE Counting DNA Nucleotides

L<http://rosalind.info/problems/dna/>

Sample input

    AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC

Sample output

    20 12 17 21

=end pod


# vim: expandtab shiftwidth=4 ft=perl6<commit_msg>[rosalind] handle default and cli input in dna example<commit_after>use v6;

=begin pod

=TITLE Counting DNA Nucleotides

L<http://rosalind.info/problems/dna/>

Sample input

    AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC

Sample output

    20 12 17 21

=end pod

my $default-input = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";

sub MAIN($input = $default-input) {
    <A C G T>.map({ +.comb(/$^symbol/) }).say given $input;
}

# vim: expandtab shiftwidth=4 ft=perl6
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.02525832376578645, 'mean_word_length': 4.891891891891892, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, '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': '5503248', 'n_tokens_mistral': 392, 'n_tokens_neox': 348, 'n_words': 77}