method total
1 | role Mixy |
1.1 | (Mixy) method total |
2 | role Baggy |
2.1 | (Baggy) method total |
3 | role Setty |
3.1 | (Setty) method total |
Documentation for method total
assembled from the following types:
role Mixy
From Mixy
(Mixy) method total
method total(--> Real)
Returns the sum of all the weights
say mix('a', 'b', 'c', 'a', 'a', 'd').total == 6; # OUTPUT: «True»say %(a => 5.6, b => 2.4).Mix.total == 8; # OUTPUT: «True»
role Baggy
From Baggy
(Baggy) method total
Defined as:
method total(Baggy:)
Returns the sum of weights for all elements in the Baggy
object.
my = bag <eggs spam spam bacon>;say .total; # OUTPUT: «4»my = ("a" => 5, "b" => 1, "b" => 2).BagHash;say .total; # OUTPUT: «8»
role Setty
From Setty
(Setty) method total
method total(--> Int)
The total of all the values of the QuantHash
object. For a Setty
object, this is just the number of elements.