In List§
See primary documentation in context for routine end.
sub end($list --> Int:D) method end(List:D: --> Int:D)
Returns the index of the last element.
say (1,2,3,4).end; # OUTPUT: «3»
In Any§
See primary documentation in context for routine end.
multi method end(Any:U: --> 0) multi method end(Any:D:) multi end($a) multi end(array:D \a) multi end($, *%)
Interprets the invocant or argument as a list, and returns the last index of that list.
say 6.end; # OUTPUT: «0» say <a b c>.end; # OUTPUT: «2» say end ^9; # OUTPUT: «8»