Module
Data.Incremental.Array
- Package
- purescript-incremental-functions
- Repository
- paf31/purescript-incremental-functions
#ArrayChange Source
data ArrayChange a da
Constructors
Instances
(Eq a, Eq da) => Eq (ArrayChange a da)
(Show a, Show da) => Show (ArrayChange a da)
(Patch a da) => Patch (IArray a) (Array (ArrayChange a da))
#mapWithIndex Source
mapWithIndex :: forall db b da a. Patch a da => Patch b db => (Jet (Atomic Int) -> Jet a -> Jet b) -> Jet (IArray a) -> Jet (IArray b)
Modify each array element by applying the specified function, taking the index of each element into account.
Note: Insertions or removals in the middle of an array will result in a cascade of modifications to the tail of the result.