Last active
August 29, 2015 14:00
-
-
Save skids/f55b1106964e500f5d60 to your computer and use it in GitHub Desktop.
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
# Still golfing, but this is metastable under moarvm on my system. | |
# Try: for i in 0 1 2 3 4 5 6 7 8 9 ; do perl6 this_file.pm6; done; | |
class C { | |
my %store{Any}; | |
multi method foo is rw { | |
%store{self}<foo> //= []; | |
%store{self}<foo>; | |
} | |
multi method bar is rw { | |
%store{self}<bar> //= False; | |
%store.keys.say; | |
%store{self}<bar>; | |
} | |
} | |
my C $c .= new(); | |
sleep(0.01.rand); | |
sleep(0.01.rand); | |
sleep(0.01.rand); | |
sleep(0.01.rand); | |
sleep(0.01.rand); | |
"OHAI".say; | |
$c.foo.push(True,False,True,False,True); | |
$c.foo.splice(0,2); | |
$c.bar = True; | |
$c.foo.push(False,True) if $c.bar; | |
$c.foo.perl.say; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment