Hello,
I'm trying to insert a new elemnt into a list after a given index and increment the orderId accordingly with the lens library.
I'm a bit confused at why this code isn't working:
```
import Control.Lens
data A = A { _customOrderId :: Int } deriving Show
things = [ A {_customOrderId = 0}
, A {_customOrderId = 1}
, A {_customOrderId = 2}
, A {_customOrderId = 3}
]
main = print $ things & ( (_drop 2 %~ ((A 22)<|)) . ((traversed . indices (> 2) . customerOrderIdLens) %~ (+ 1)) )
```
The first portion works to insert where desired, but the second portion `((traversed . indices (> 2) . customerOrderIdLens) %~ (+ 1))` only increments the order id in indices 4.
Any idea why this is happening?
Thanks,
Cody Goodman