diff --git a/doc/Type/Baggy.pod b/doc/Type/Baggy.pod index 87b545d9a..eba804ea5 100644 --- a/doc/Type/Baggy.pod +++ b/doc/Type/Baggy.pod @@ -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 +object. + + my $breakfast = bag ; + say $breakfast.total; # 4 + + my $n = ("a" => 5, "b" => 1, "b" => 2).BagHash; + say $n.total; # 8 =head2 method ACCEPTS