Portability | MPTCs, Rank2Types, LiberalTypeSynonyms |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Safe-Inferred |
Indexing
Setters
ixmapped :: (IArray a e, Ix i, Ix j) => (i, i) -> Setter (a j e) (a i e) i jSource
This setter can be used to derive a new IArray
from an old array by
applying a function to each of the indices to look it up in the old IArray
.
This is a contravariant Setter
.
ixmap
≡over
.ixmapped
ixmapped
≡sets
.ixmap
over
(ixmapped
b) f arr!
i ≡ arr!
f ibounds
(over
(ixmapped
b) f arr) ≡ b
Traversal
traverseArray :: (IArray a c, IArray a d, Ix i) => IndexedTraversal i (a i c) (a i d) c dSource
An IndexedTraversal
of the elements of an IArray
, using the
index into the array as the index of the traversal.
amap
≡over
traverseArray