Job Vranish wrote:
A simple but powerful implementation of function lenses (aka functional references, accessors, etc..).
Nice! I will definitely give it a whirl when I pick up my MUD again. I'm currently using accessors there. I see your functions are limited to use in the state monad--you're right, I've never used accessors outside of a state monad yet.
I'm somewhat sad that you didn't capture lenses in a datatype, because it is such a nice example of a Category instance. I would like to see how to compose lenses to access deeper fields--I use nested data structures and would like to modify fields that are hidden deeper in the state. Can you perhaps add an example to show that?
Thanks! Martijn. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe