Product Site

5.3.6.37. supplier

Returns a Supplier object for the array. The supplier allows you to iterate over the index/item pairs of the array. The supplier enumerates the array items in their sequenced order. For multi-dimensional Arrays, the supplier index method will return the index values as an array of index numbers.
Example 5.190. Array class — supplier method
a = .array~of("Fred", "Mike", "David")
sup = a~supplier
a~append("Joe")
do while sup~available
   say sup~item  -- displays "Fred", "Mike", and "David"
   sup~next
end