indices
from
Data.Array
https://hackage.haskell.org/package/base-4.19.0.0/docs/GHC-Arr.html#v:indices
全てのindexをリストとして返す
code:hs
indices :: Ix i => Array i e ->
i
例
code:hs
myArray :: Array Int Int
myArray = array (1, 5)
(1, 10), (2, 20), (3, 30), (4, 40), (5, 50)
myIndices ::
Int
myIndices = indices myArray --
1, 2, 3, 4, 5