Sha256: 12fadbef73645b0b929e23abfce445ad71b723153e6c951707da4e9b4c3b0127

Contents?: true

Size: 196 Bytes

Versions: 75

Compression:

Stored size: 196 Bytes

Contents

class Grains is export {
    method square($number) {
        2**($number-1);
    }

    method total {
        my $total;
        for  1..64 { $total += self.square($_) }
        $total;
    }
}

Version data entries

75 entries across 75 versions & 1 rubygems

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