Skip to content
Permalink
Browse files

Make Mu<> work as before

The original proto of postcircumfix:<{ }> was just |, so it also accepted
Mu.  This adds Mu to the current signature, and fast-paths the <> case.
  • Loading branch information...
lizmat committed Feb 8, 2019
1 parent f3f7c5c commit d904b7048bfaa8b7e1583baa1af0665f29c5b8c3
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/core/hash_slice.pm6
@@ -1,6 +1,6 @@
# all sub postcircumfix {} candidates here please

proto sub postcircumfix:<{ }>($, $?, Mu $?, *%) is nodal {*}
proto sub postcircumfix:<{ }>(Mu $, $?, Mu $?, *%) is nodal {*}

# %h<key>
multi sub postcircumfix:<{ }>( \SELF, \key ) is raw {
@@ -163,11 +163,10 @@ multi sub postcircumfix:<{ }>(\SELF, Bool() :$v!, *%other) is raw {
?? SLICE_MORE_HASH( SELF, SELF.keys.list, 'v', $v, %other )
!! SELF{SELF.keys.list};
}
multi sub postcircumfix:<{ }>( \SELF, *%other ) is raw {
SELF.ZEN-KEY(|%other);
multi sub postcircumfix:<{ }>(Mu \SELF, *%other ) is raw {
%other ?? SELF.ZEN-KEY(|%other) !! nqp::decont(SELF)
}


proto sub postcircumfix:<{; }>($, $, *%) is nodal {*}

sub MD-HASH-SLICE-ONE-POSITION(\SELF, \indices, \idx, int $dim, \target) {

0 comments on commit d904b70

Please sign in to comment.
You can’t perform that action at this time.