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: | accum |
Type: | Ix a => (b -> c -> b) -> Array a b -> [(a,c)] -> Array a b |
Description: | takes an array and an association list and accumulates pairs from the list into the array with the accumulating function |
Related: |
Input: accum (+) (array (1,3) [(1,1),(2,2),(3,3)]) [(1,1),(2,-2),(3,2),(3,-2)]
Output: array (1,3) [(1,2),(2,0),(3,3)]