Product Site

5.3.6.17. hasItem

Returns .true if the array contains the specified item at any index location. Returns .false otherwise. Item equality is determined by using the == method of item.
Example 5.176. Array class — hasItem method
a = .array~of("Mike", "Rick", "Fred", "Rick")
say a~hasItem("Rick")  -- says: 1
say a~hasItem("Mark")  -- says: 0