[Haskell-cafe] Lenses: Should I declare Getters?

Charlie Paul charlieap at gmail.com
Tue Sep 10 07:31:38 CEST 2013

I've been looking through Edward Kmett's lens library, and I'm a bit
befuddled about Getters. In my own code, why would I want to have something
be a Getter instead of a plain function? As far as I can see, a plain
function is simpler to use, and can be converted to a Getter with "to" if
we want to use it as a Fold. Is there a situation where writing a Getter is
superior than writing a function, then lifting it as needed?

Thank you,

Charles Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130909/ca46d378/attachment.htm>

More information about the Haskell-Cafe mailing list