ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | >> Array << | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | Array |
---|---|
Function: | indices |
Type: | Ix a => Array a b -> [a] |
Description: | The functions indices, elems, and assocs, when applied to an array, return lists of the indices, elements, or associations, respectively, in index order. |
Related: | assocs, bounds, elems |
Input: indices (array (0,3) [(1,"A"),(2,"B"),(3,"D"),(0,"QQQ")])
Output: [0,1,2,3]
Input: indices (array (0,3) [(2,"B")])
Output: [0,1,2,3]
Input: indices (array (3,5) [])
Output: [3,4,5]