-
-
Save salortiz/73a92a15857759cf2eccec9c0df24db6 to your computer and use it in GitHub Desktop.
Give them some rope
This file contains hidden or 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
role Str2Pos does Positional does Iterable { | |
has $!b handles <elems EXIST-POS> = self.encode; | |
method AT-POS(\i) { $!b[i].chr } | |
method iterator { (.chr for $!b.list).iterator } | |
} | |
my @s := "Give them some rope" but Str2Pos; | |
dd @s[3,8,11]; | |
dd @s.list; | |
for @s { .say }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment