02:08 <magbo> (<%~) l h y = l (\x -> (h x, h x)) y
02:08 <magbo> Works on every lens.
02:08 <magbo> Returns (b, t) -- updated focused value and updated source
02:09 <puregreen> magbo: do you know how the Functor instance for (,) works?
02:09 <magbo> (,) is the outer functor, that was my intention when I was writing it
02:10 <magbo> puregreen: oh snap, it answers my question!
02:10 <jle`> it's Writer! :O
02:11 <jle`> magbo: `(\x -> tell (h x) >> return (h x))` would get you
the Writer translation of what you wrote
02:11 <puregreen> jle`: ooh, I like this one
02:12 <puregreen> gotta steal it for lens over tea
02:12 <jle`> it's technically wrong because it requires a Monoid instance i think
02:16 <jle`> puregreen: oh, you can get a working version of what i wrote
with tell (h x) $> h x, because while it's equivalent to
tell (h x) *> return (h x), it doesn't require a Monoid constraint