aboutsummaryrefslogtreecommitdiff
path: root/challenge-026/arne-sommer/perl6/stringcounter-subset
blob: 35d3000a56f13878b7429e0be7e7e91629002632 (plain)
1
2
3
4
5
6
7
#! /usr/bin/env perl6

subset AtoZ of Str where /^ <[A .. Z a .. z]>+ $/;

unit sub MAIN (AtoZ $alphabet, AtoZ $string);

say $alphabet.comb.unique.map( { $string.comb.grep(* eq $_ ) } ).sum;