Skip to content

Commit a1bd28f

Browse files
author
Jan-Olof Hendig
committed
Added docs for Setty.new-from-pairs. viki++
1 parent 0e4758a commit a1bd28f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/Type/Setty.pod6

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ See L<Set> and L<SetHash>.
1111
1212
=head1 Methods
1313
14+
=head2 method new-from-pairs
15+
16+
Defined as:
17+
18+
method new-from-pairs(*@pairs) returns Setty:D
19+
20+
Constructs a Setty object from a list of L«C<Pair> objects|/type/Pair»
21+
given as positional arguments:
22+
23+
say Set.new-from-pairs: 'butter' => 0.22, 'salt' => 0, 'sugar' => 0.02;
24+
# OUTPUT:
25+
# set(butter, sugar)
26+
27+
B<Note:> be sure you aren't accidentally passing the Pairs as positional arguments;
28+
the quotes around the keys in the above example are significant.
29+
1430
=head2 method grab
1531
1632
method grab($count = 1)

0 commit comments

Comments
 (0)