Sha256: 564a8dafed1ff9676fa49b7bd7124617827035d054ce9f91e319f515ddf768fa

Contents?: true

Size: 305 Bytes

Versions: 69

Compression:

Stored size: 305 Bytes

Contents

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

69 entries across 69 versions & 1 rubygems

Version Path
trackler-2.0.8.28 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.27 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.26 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.24 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.23 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.22 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.21 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.20 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.19 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.18 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.17 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.16 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.15 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.14 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.13 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.12 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.11 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.10 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.9 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.8 tracks/perl6/exercises/atbash-cipher/Example.pm