Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve BagHash.new examples #1629

Closed
zoffixznet opened this issue Oct 25, 2017 · 0 comments
Closed

Improve BagHash.new examples #1629

zoffixznet opened this issue Oct 25, 2017 · 0 comments
Labels
docs Documentation issue (primary issue type) good first issue If you want to dive in, this would be a good place to start

Comments

@zoffixznet
Copy link
Contributor

https://irclog.perlgeek.de/perl6-dev/2017-10-25#i_15352349

15:57 | jnthn | m: my $n = BagHash.new: "a" => 0, "b" => 1, "c" => 2, "c" => 2; say $n.perl
-- | -- | --
15:57 | camelia | rakudo-moar 97b11edd6: OUTPUT: «(:c(2)=>2,:b(1),:a(0)).BagHash␤»
15:57 | jnthn | m: my $n = BagHash.new-from-pairs: "a" => 0, "b" => 1, "c" => 2, "c" => 2; say $n.perl
15:57 | camelia | rakudo-moar 97b11edd6: OUTPUT: «("b","c"=>4).BagHash␤»
15:58 | jnthn | It might be less confusing if the .new example at https://docs.perl6.org/type/BagHash#Creating_BagHash_objects didn't use pairs that look like they'll be providing weights as its first example
@zoffixznet zoffixznet added docs Documentation issue (primary issue type) Hacktoberfest labels Oct 25, 2017
tisonkun added a commit that referenced this issue Oct 25, 2017
@coke coke added good first issue If you want to dive in, this would be a good place to start and removed LHF labels Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) good first issue If you want to dive in, this would be a good place to start
Projects
None yet
Development

No branches or pull requests

2 participants