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