Sha256: 12f8834df45e47279e005921f3c1ea47b3d6442d94d66bd493ae144c2dda4b49

Contents?: true

Size: 236 Bytes

Versions: 61

Compression:

Stored size: 236 Bytes

Contents

unit module Leap:ver<1>; 

sub is-leap-year ($year) is export {
  is-divisible($year, 400)
    || is-divisible($year, 4)
    && !is-divisible($year, 100);
}

sub is-divisible($year, $number) {
  $year % $number == 0 ?? True !! False;
}

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
trackler-2.1.0.33 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.32 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.31 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.30 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.29 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.28 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.27 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.26 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.25 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.24 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.23 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.22 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.21 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.20 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.19 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.18 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.17 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.16 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.15 tracks/perl6/exercises/leap/Example.pm6
trackler-2.1.0.14 tracks/perl6/exercises/leap/Example.pm6