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.6.12 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.11 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.10 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.9 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.8 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.7 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.6 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.5 tracks/perl6/exercises/atbash-cipher/Example.p6
trackler-2.0.6.4 tracks/perl6/exercises/atbash-cipher/Example.p6