Sha256: 5ae1148cab8e9d97a3addd0ad91b4c6a0d73b5ab4c5ef04e122e24564f3f158f

Contents?: true

Size: 376 Bytes

Versions: 96

Compression:

Stored size: 376 Bytes

Contents

our $earth_revolution = 31557600;

our %planets = (
    mercury => 0.2408467,
    venus   => 0.61519726,
    mars    => 1.8808158,
    jupiter => 11.862615,
    saturn  => 29.447498,
    uranus  => 84.016846,
    neptune => 164.79132,
    earth   => 1,
);

sub age-on( $planet, $seconds ) is export {
    ( $seconds / %planets{$planet.lc} / $earth_revolution ).round(0.01);
}

Version data entries

96 entries across 96 versions & 1 rubygems

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