ekmett/lens

cloneGetter

Opened this issue · 2 comments

Lev135 commented

Why don't we have cloneGetter :: Getting a s a -> Getter s a? Is it less efficient/useful then others from clone family?

phadej commented

Probably because nobody needed nor have written one.

cloneGetter g = to (view g)

should be as efficient as it can get.

Lev135 commented

Thank's. That's just as I thought :). Maybe we can add it for consistency with other optics? Anyway it's hardly worth anything. Just noticed it and was curious why it's not presented (and found one of the rare cases, where it's needed)