Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make Bag/Mix.list more hashy, returning .pairs
Bags and Mixes are more naturally hashy, so we'll default to returning
.pairs in list context.  Set, however, still returns only .keys for its
default list, since the values are uninterestingly true.  (cf RT #121947)
  • Loading branch information
TimToady committed Sep 10, 2014
1 parent 528f7c0 commit 24fb00c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions S02-bits.pod
Expand Up @@ -1638,8 +1638,9 @@ simultaneously, but an iterator/list itself has only one thread of
consumption. Every time you do C<get> on an iterator, a value
disappears from its list.

Note that C<Set>, C<Bag>, and C<Mix> iterators return only keys, not values. You
must explicitly use c<.pairs> to get key/value pairs.
Note that C<Set> iterators return only the keys, not the boolean values. You
must explicitly use C<.pairs> to get key/value pairs. The C<Bag> and C<Mix>
types, on the other hand, default to returning pairs, as a C<Hash> does.

=head2 Mutable types

Expand Down

0 comments on commit 24fb00c

Please sign in to comment.