Sha256: 9c2dcadac07b4498958709f545e1f7e07cf6df5af6b7f5135eb2d3544ef21bd4
Contents?: true
Size: 676 Bytes
Versions: 82
Compression:
Stored size: 676 Bytes
Contents
exercise: AtbashCipher version: 1 plan: 4 imports: '&encode &decode' tests: | for @($c-data<cases>) { my $test = .<description> ~~ 'encode' ?? 'encode' !! 'decode'; subtest $test => { my @cases = |.<cases>; plan +@cases; is &::($test)(.<phrase>), |.<expected description> for @cases; } } unit: module example: | sub encode($input) is export { decode($input.lc.trans( ['a'..'z', 0..9] => '', :complement ) ) .comb(5) .join: ' '; } sub decode (Str $input) is export { return $input .lc .subst( /\W/, '', :g ) .trans( [ 'a'..'z' ] => ['a'..'z'].reverse ); }
Version data entries
82 entries across 82 versions & 1 rubygems
Version | Path |
---|---|
trackler-2.1.0.36 | tracks/perl6/exercises/atbash-cipher/example.yaml |
trackler-2.1.0.34 | tracks/perl6/exercises/atbash-cipher/example.yaml |