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
#!/usr/bin/env perl6 | |
enum Keyword «a b c»; | |
class C { | |
has %.keywords; | |
} | |
my $c = C.new: :keywords{(a) => True}; |
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
#!/usr/bin/env perl6 | |
use NativeCall; | |
sub qsort( | |
CArray[int32] $base, | |
size_t $count, | |
size_t $size, | |
&compare:( | |
Pointer[int32] $ap, |
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
class A { | |
has $.x; | |
method WHICH { | |
ValueObjAt.new: "A|$!x.WHICH()" | |
} | |
} | |
# Whose images we collect. | |
my @G = A.new(x => 1); |
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
Public Sub Main() | |
For i As Integer = 1 To 10 | |
Print i; "...";; | |
Next | |
End |