Skip to content

Commit

Permalink
Clarification.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfa committed Feb 21, 2019
1 parent d458018 commit 51479af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/Type/Pair.pod6
Expand Up @@ -116,22 +116,22 @@ Defined as:
multi method ACCEPTS(Pair:D $: Pair:D $topic)
multi method ACCEPTS(Pair:D $: Mu $topic)
If C<topic> is an L<Associative|/type/Associative>, looks up the value using invocant's key in
If C<%topic> is an L<Associative|/type/Associative>, looks up the value using invocant's key in
it and checks invocant's value C<.ACCEPTS> that value:
say %(:42a) ~~ :42a; # OUTPUT: «True␤»
say %(:42a) ~~ :10a; # OUTPUT: «False␤»
If C<topic> is another L<Pair|/type/Pair>, checks the invocant's value
C<.ACCEPTS> the C<topic's> value. Note that the keys are not considered and can
If C<$topic> is another L<Pair|/type/Pair>, checks the invocant's value
C<.ACCEPTS> the C<$topic>'s value. Note that the keys are not considered and can
be different:
say :42a ~~ :42a; # OUTPUT: «True␤»
say :42z ~~ :42a; # OUTPUT: «True␤»
say :10z ~~ :42a; # OUTPUT: «False␤»
If C<topic> is any other value, uses the invocant's key as the name of the
method to call on C<topic> and checks that its L«C<.Bool>|/routine/Bool» is the same
If C<$topic> is any other value, uses the invocant's key as the name of the
method to call on C<$topic> and checks that its L«C<.Bool>|/routine/Bool» is the same
as C<.Bool> of the invocant's value. This form can be used to check
L<Bool|/type/Bool> values of multiple methods on the same object, such as
L<IO::Path>, by using L<Junctions|/type/Junction>:
Expand Down

0 comments on commit 51479af

Please sign in to comment.