Namely, when you try to update a filed using the previous (current) state with a given function `f`, just write `x{it $= f}`.