Chess Colours
use Test;
subset ChessPos of Str where /^<[a..h]><[1..8]>$/;
my %a is Set = <a c e g>;
sub chess(ChessPos $p) {
my ($col, $row) = $p.comb;
%a{$col}.&{ $row %% 2 ?? .so !! .not }
}
is "d3".&chess, True;
is "g5".&chess, False;
is "e6".&chess, True;INFO