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.7 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.6 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.5 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.4 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.3 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.2 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.8.1 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.7.0 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.44 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.43 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.42 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.41 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.40 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.39 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.38 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.37 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.36 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.35 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.34 tracks/perl6/exercises/atbash-cipher/Example.pm
trackler-2.0.6.33 tracks/perl6/exercises/atbash-cipher/Example.p6