Product SiteDocumentation Site

5.3.6.38. supplier


>>-supplier----------------------------------------------------><

Returns a Supplier (Section 5.4.18, “The Supplier Class”) object for the collection. The supplier allows you to iterate over the index/item pairs for the collection. 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.157. 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