Documentation for routine end

Documentation for routine end, assembled from the following types:

class Any

From Any

(Any) method end

method end(--> Any:Dis nodal

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␤» 

class List

From List

(List) routine end

Defined as:

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␤»