Skip to content

Instantly share code, notes, and snippets.

@dwarring
Last active August 29, 2015 14:07

Revisions

  1. dwarring revised this gist Oct 10, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    sub repeat(Str $input --> Rat) {
    my $phrase := :36($input);
    my $l := (36 ** $input.chars) -1;
    my $l := (36 ** $input.chars) - 1;
    $phrase/$l;
    }

  2. dwarring revised this gist Oct 10, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    sub repeat(Str $input --> Rat) {
    my $phrase := :36($input);
    my $l := (36 ** $input.chars) -1;
    $phrase/$l * 36 ** 20;
    $phrase/$l;
    }

    say (repeat('sixrocks') * 36 ** 20).base(36);
    say (repeat('sixrocks') * 36 ** 40).base(36);
  3. dwarring revised this gist Oct 10, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    sub repeat(Str $input --> Rat) {
    my $phrase := :36($input);my $l := 36 ** ($input.chars) -1;
    ($phrase/$l * 36 ** 20)
    my $phrase := :36($input);
    my $l := (36 ** $input.chars) -1;
    $phrase/$l * 36 ** 20;
    }

    say (repeat('sixrocks') * 36 ** 20).base(36);
  4. dwarring revised this gist Oct 10, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ub repeat(Str $input --> Rat) {
    sub repeat(Str $input --> Rat) {
    my $phrase := :36($input);my $l := 36 ** ($input.chars) -1;
    ($phrase/$l * 36 ** 20)
    }
  5. dwarring created this gist Oct 10, 2014.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    ub repeat(Str $input --> Rat) {
    my $phrase := :36($input);my $l := 36 ** ($input.chars) -1;
    ($phrase/$l * 36 ** 20)
    }

    say (repeat('sixrocks') * 36 ** 20).base(36);