-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Description
I noticed a reoccurring help function across several applications that I've written, and I think it would be nice to have these in vector itself:
traverse_ ::
(a -> m b)
-> MVector (PrimState m) a
-> m ()
foldM :: -- Should probably be named foldlM instead as in Data.Foldable, but vector uses foldM elsewhere
(b -> a -> m b)
-> b
-> MVector (PrimState m) a
-> m b
The implementations are both straightforward, and I'm happy to implement this if others find it worthwhile. There is the possibility of a traverse that either (a) mutates the vector in-place or (b) creates a new mutable vector. There's more room to disagree there, so if anyone is interested in that, I think that discussing it on a separate issue would be better.
Metadata
Metadata
Assignees
Labels
No labels