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 |
---|---|
Operator: | (//) |
Type: | Ix a => Array a b -> [(a,b)] -> Array a b |
Priority: | 9 |
Description: | The operator ((//)) takes an array and a list of pairs and returns an array identical to the left argument except that it has been updated by the associations in the right argument. |
Related: |
Input: (array (0,3) [(0,'A'),(1,'B'),(2,'C'),(3,'D')]) // [(3,'X'),(1,'X')]
Output: array (0,3) [(0,'A'),(1,'X'),(2,'C'),(3,'X')]
Input: (listArray ((0,0),(2,1)) "ABCDEF") // [((1,1),'X'),((0,0),'X')]
Output: array ((0,0),(2,1)) [((0,0),'X'),((0,1),'B'),((1,0),'C'),((1,1),'X'),((2,0),'E'),((2,1),'F')]