This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
our %world = {} ; | |
role Identifier { | |
has $.id is rw ; | |
} | |
role Container { | |
has @.contents is rw ; | |
method add($item) { | |
@!contents.push($item) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
≠|≤|≥ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.say for ^888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MAIN | |
require ($*PROGRAM.parent.absolute ~ "/to_require.pm") <required_role> ; | |
my $c = 1 does required_role ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my int $max = 2_000_000 × 4; | |
# find all primes up to $max using The Sieve of Erathostenes | |
my int @a = (0..$max); | |
for (2..($max div 2)) -> int $i { | |
my int $j = 2; | |
@a[$i * $j++] = 1 while $i * $j <= $max; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use FooBar; | |
module Foo { | |
sub foo is export { "foo" ~ bar() } | |
} | |
sub EXPORT { | |
FooBar::EXPORT::DEFAULT:: | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#use Slang::Tuxic; | |
#use Text::CSV; | |
#use File::Find; | |
my $csv_line = ‘foo’; # Text::CSV.new (eol => "\n"); | |
my $cols = 49; | |
my @IO-object-list = < a b c >; #find(:dir</home/user1/documents/animals>, :type<file>, :name(/armadillos_201<[4..8]>.*\.csv/)); | |
for @IO-object-list -> $IO-object { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my Int @cache is default(0); | |
my $sum89 = 0; | |
for (1..567) -> $i { | |
@cache[$i] = calc-chain($i); | |
} | |
for (1..400_000) -> $i { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if[^{]+=(?!=)[^{]+\{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\<\-\> |
NewerOlder