On 29 December 2015 at 10:32, David Turner <dct25-561bs@mythic-beasts.com> wrote:
As soon as I sent this, I think I hit on the answer. There's no getting away from having to write a strategy like this:

evalActualsWith :: Strategy [ActualShift] -> Strategy User
evalActualsWith strat user = do
  actuals' <- strat $ actuals user
  return $ user { actuals = actuals' }

Hang on, isn't evalActualsWith just the lens for the actuals field with a slightly more specialised type?

That's pretty cool.

Cheers,

David