-- λ> addTwoOccupation (select [pr|UserId,Age,Occupation|] (frameRow ms 0))
-- {occupation :-> "technician", user id :-> 3, age :-> 26}
-- #+END_EXAMPLE

-- It is a bit clumsy to delete and then add back a particular field,
-- and the dependence on explicit structure is relying a bit more on
-- coincidence than we might like. We could choose, instead, to work
-- with row types that contain a distinguished column somewhere in
-- their midst, but regarding precisely /where/ it is, or /how many/
-- other fields there are, we care not.

addTwoOccupation' :: forall rs rs'.
                     (CanDelete Occupation rs,
                      rs' ~ RDelete Occupation rs,
                      AllCols Num rs', AsVinyl rs')
                  => Record rs -> Record rs
addTwoOccupation' = lenses [pr|rs'|] %~ mapMethod [pr|Num|] (+ 2)

-- #+BEGIN_EXAMPLE
addTwoOccupation' :: forall rs rs'.
                     (CanDelete Occupation rs,
                      rs' ~ RDelete Occupation rs,
                      AllCols Num rs', AsVinyl rs')
                  => Record rs -> Record rs
addTwoOccupation' = lenses [pr|rs'|] %~ mapMethod [pr|Num|] (+ 2)
addTwoOccupation' = lenses [pr|rs'|] %~ mapMethod [pr|Num|] (+ 2)