ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | >> Array << | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Array
Function: listArray
Type: Ix a => (a,a) -> [b] -> Array a b
Description:
Related: accumArray, array

Example 1

Input: listArray (1,5) [4,5,6,7,8]

Output: array (1,5) [(1,4),(2,5),(3,6),(4,7),(5,8)]

Example 2

Input: listArray (10,14) "ABCDE"

Output: array (10,14) [(10,'A'),(11,'B'),(12,'C'),(13,'D'),(14,'E')]

Example 3

Input: listArray ((0,0),(1,2)) "ABCDEF"

Output: array ((0,0),(1,2)) [((0,0),'A'),((0,1),'B'),((0,2),'C'),((1,0),'D'),((1,1),'E'),((1,2),'F')]