Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
document antipairs for Setty,reorder in page
  • Loading branch information
lukasvalle committed May 17, 2019
1 parent 5ddf5a7 commit af5b559
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions doc/Type/Setty.pod6
Expand Up @@ -97,28 +97,28 @@ die face is a set element.
If C<*> is passed as C<$count>, the list is infinite.
=head2 method keys
=head2 method antipairs
Defined as:
multi method keys(Setty:D: --> Seq:D)
multi method antipairs(Setty:D: --> Seq:D)
Returns a L<Seq|/type/Seq> of all elements of the set.
Returns all elements in the set and C<True> as a L<Seq|/type/Seq> of L<Pairs|/type/Pair>,
where the element itself is the value, i.e. the opposite of method C<pairs>.
my $s = Set.new(1, 2, 3);
say $s.keys; # OUTPUT: «(3 1 2)␤»
my $s = Set.new(1, 2, 3, 1);
say $s.antipairs.sort; # OUTPUT: «(True => 1 True => 2 True => 3)␤»
=head2 method antipairs
=head2 method keys
Defined as:
method antipairs(Setty:D: --> Seq:D)
multi method keys(Setty:D: --> Seq:D)
Returns all elements in the set and C<True> as a L<Seq|/type/Seq> of L<Pairs|/type/Pair>,
where the element itself is the value, i.e. the opposite of method C<pairs>.
Returns a L<Seq|/type/Seq> of all elements of the set.
my $s = Set.new(1, 2, 3, 1);
say $s.antipairs.sort; # OUTPUT: «(True => 1 True => 2 True => 3)␤»
my $s = Set.new(1, 2, 3);
say $s.keys; # OUTPUT: «(3 1 2)␤»
=head2 method values
Expand Down

0 comments on commit af5b559

Please sign in to comment.