In role Baggy§

See primary documentation in context for method kxxv

method kxxv(Baggy:D: --> Seq:D)

Returns a Seq of the keys of the invocant, with each key multiplied by its weight. Note that kxxv only works for Baggy types which have integer weights, i.e. Bag and BagHash.

my $breakfast = bag <spam eggs spam spam bacon>;
say $breakfast.kxxv.sort;                         # OUTPUT: «(bacon eggs spam spam spam)␤»

my $n = ("a" => 0, "b" => 1, "b" => 2).BagHash;
say $n.kxxv;                                      # OUTPUT: «(b b b)␤»

In role Mixy§

See primary documentation in context for method kxxv

method kxxv()

Throws an exception. The feature is not supported on the type, since there's no clear value to subtract from non-integral weights, to make it work.