Add a strict over?
Opened this issue · 1 comments
treeowl commented
I don't see a strict version of over
, which we could put in Control.Lens.Traversal
.
over' :: ATraversal s t a b -> (a -> b) -> s -> t
over' l f = getSolo . cloneTraversal l (\old -> Solo $! f old)
where
getSolo (Solo x) = x
I don't remember how indexed stuff works, but I'm sure that's available too.