Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

r29149 - docs/Perl6/Spec/S32-setting-library

0 views
Skip to first unread message

pugs-c...@feather.perl6.nl

unread,
Nov 20, 2009, 11:06:23 AM11/20/09
to perl6-l...@perl.org
Author: lwall
Date: 2009-11-20 17:06:23 +0100 (Fri, 20 Nov 2009)
New Revision: 29149

Modified:
docs/Perl6/Spec/S32-setting-library/Containers.pod
Log:
[S32/Containers] minor typos


Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-11-20 15:53:45 UTC (rev 29148)
+++ docs/Perl6/Spec/S32-setting-library/Containers.pod 2009-11-20 16:06:23 UTC (rev 29149)
@@ -694,11 +694,12 @@

=item push

- our Int multi method push ( @hash: *@values ) is export
+ our Hash multi method push ( @hash: *@values ) is export

Like hash assignment insofar as it accepts either C<Pair> objects or
-alternating keys and values; however, unlike assignment, when
-a duplicate key is detected, coerces the colliding entry's value to an
+alternating keys and values; also like in that it returns the new hash;
+However, unlike assignment, when a duplicate key is detected,
+C<push> coerces the colliding entry's value to an
array and pushes the Pair's value onto that array. Hence to invert
a hash containing duplicate values without losing (associative) information,
say:
@@ -841,7 +842,7 @@
our multi method pick ( $set: Int $num = 1, Bool :$replace )
our multi method pick ( $set: Whatever, Bool :$replace )

-Works like an ordinaty list C<pick>.
+Works like an ordinary list C<pick>.

=back

@@ -860,7 +861,7 @@
our multi method pick ( $bag: Int $num = 1, Bool :$replace )
our multi method pick ( $bag: Whatever, Bool :$replace )

-Like an ordinary list pick, but returns keys of the bag weighted by
+Like an ordinary list C<pick>, but returns keys of the bag weighted by
values, as if the keys were replicated the number of times indicated
by the corresponding value and then list pick used. C<KeyBag> is the
mutable form of C<Bag>. A C<Bag> responds to hash operators as

0 new messages