Product Site

5.3.6.16. hasIndex

Returns .true if the array contains an item associated with the specified index or indexes. Returns .false otherwise.

Note that the index argument may also be specified as an array of indexes.
Example 5.175. Array class — hasIndex method
a = .array~of("Mike", "Rick", "Fred", "Rick")
say a~hasIndex(2)  -- says: 1
say a~hasIndex(5)  -- says: 0