See Original text in context
multi method end(Any: --> 0)multi method end(Any:)
Interprets the invocant as a list, and returns the last index of that list.
say 6.end; # OUTPUT: «0»say <a b c>.end; # OUTPUT: «2»
See Original text in context
sub end( --> Int)method end(List: --> Int)
Returns the index of the last element.
say (1,2,3,4).end; # OUTPUT: «3»