Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get hash slices essentially working. In the process, move Associative…
… role completely into the setting. Nothing in PIR actually did it, plus we now have the ability to augment the role into classes in the core setting anyway, so it's no problem to add to things first defined in PIR anyway. Slight re-think of how we handle non-Perl 6 hashes that seems rather cleaner to me; need to tweak array indexing similarly, will do it soon.
- Loading branch information
Showing
9 changed files
with
66 additions
and
93 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
role Associative[::T = Mu] { | ||
our multi method postcircumfix:<{ }>() { | ||
self.values() | ||
} | ||
our multi method postcircumfix:<{ }>(*@keys) { | ||
my $result = pir::new__ps('ResizablePMCArray'); | ||
for @keys { | ||
pir::push($result, self{$_}) | ||
} | ||
Q:PIR { | ||
$P0 = find_lex '$result' | ||
.tailcall '&infix:<,>'($P0 :flat) | ||
} | ||
} | ||
method of() { | ||
T | ||
} | ||
} |
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
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