Skip to content

Commit

Permalink
Added docs for Baggy.total
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Olof Hendig committed Jun 11, 2016
1 parent 36b9299 commit 74e96d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion doc/Type/Baggy.pod
Expand Up @@ -115,7 +115,18 @@ taking the individual elements weight into account.
=head2 method total
=comment TODO
Defined as:
method total(Baggy:D:)
Returns the sum of weights for all elements in the C<Baggy>
object.
my $breakfast = bag <eggs spam spam bacon>;
say $breakfast.total; # 4
my $n = ("a" => 5, "b" => 1, "b" => 2).BagHash;
say $n.total; # 8
=head2 method ACCEPTS
Expand Down

0 comments on commit 74e96d7

Please sign in to comment.