summary refs log tree commit diff stats
path: root/raku/nucleotide-count/NucleotideCount.rakumod
diff options
context:
space:
mode:
Diffstat (limited to 'raku/nucleotide-count/NucleotideCount.rakumod')
-rw-r--r--raku/nucleotide-count/NucleotideCount.rakumod6
1 files changed, 6 insertions, 0 deletions
diff --git a/raku/nucleotide-count/NucleotideCount.rakumod b/raku/nucleotide-count/NucleotideCount.rakumod
new file mode 100644
index 0000000..03bae38
--- /dev/null
+++ b/raku/nucleotide-count/NucleotideCount.rakumod
@@ -0,0 +1,6 @@
+unit module NucleotideCount;
+
+subset DNA of Str where * !~~ /<-[ACGT]>/;
+sub nucleotide-count (DNA $strand) is export {
+    $strand.comb.Bag;
+}