We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36b9299 commit 74e96d7Copy full SHA for 74e96d7
doc/Type/Baggy.pod
@@ -115,7 +115,18 @@ taking the individual elements weight into account.
115
116
=head2 method total
117
118
-=comment TODO
+Defined as:
119
+
120
+ method total(Baggy:D:)
121
122
+Returns the sum of weights for all elements in the C<Baggy>
123
+object.
124
125
+ my $breakfast = bag <eggs spam spam bacon>;
126
+ say $breakfast.total; # 4
127
128
+ my $n = ("a" => 5, "b" => 1, "b" => 2).BagHash;
129
+ say $n.total; # 8
130
131
=head2 method ACCEPTS
132
0 commit comments