<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 29 December 2015 at 10:32, David Turner <span dir="ltr"><<a href="mailto:dct25-561bs@mythic-beasts.com" target="_blank">dct25-561bs@mythic-beasts.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>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:</div><div><br></div><div><font face="monospace, monospace">evalActualsWith :: Strategy [ActualShift] -> Strategy User</font></div><div><font face="monospace, monospace">evalActualsWith strat user = do</font></div><div><font face="monospace, monospace">  actuals' <- strat $ actuals user</font></div><div><font face="monospace, monospace">  return $ user { actuals = actuals' }</font></div></div></blockquote><div><br></div><div>Hang on, isn't <span style="font-family:monospace,monospace">evalActualsWith</span> just the lens for the <font face="monospace, monospace">actuals</font> field with a slightly more specialised type?</div><div><br></div><div>That's pretty cool.</div><div><br></div><div>Cheers,</div><div><br></div><div>David</div><div><br></div><div><br></div></div></div></div>