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

Add Iso involution #868

Closed
julien-truffaut opened this issue Jun 19, 2020 · 0 comments
Closed

Add Iso involution #868

julien-truffaut opened this issue Jun 19, 2020 · 0 comments

Comments

@julien-truffaut
Copy link
Member

An involution is a method that is its own inverse, e.g. f(f(x)) == x

e.g. List(1,2,3).reverse.reverse == List(1,2,3)

We should be able to define:

def involution[A](update: A => A): Iso[A]

Bonus point:
Could we refactor some optics to use involution?

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

No branches or pull requests

1 participant