Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloneGetter #1036

Open
Lev135 opened this issue Jul 7, 2023 · 2 comments
Open

cloneGetter #1036

Lev135 opened this issue Jul 7, 2023 · 2 comments

Comments

@Lev135
Copy link

Lev135 commented Jul 7, 2023

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

@phadej
Copy link
Collaborator

phadej commented Jul 7, 2023

Probably because nobody needed nor have written one.

cloneGetter g = to (view g)

should be as efficient as it can get.

@Lev135
Copy link
Author

Lev135 commented Jul 7, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants