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

generalise Traversal.applyN to Optional #1100

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Conversation

julien-truffaut
Copy link
Member

No description provided.

*/
def applyN[S, A](xs: Lens[S, A]*): Traversal[S, A] =
def applyN[S, A](xs: Optional[S, A]*): Traversal[S, A] =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we won't have applyN for lenses anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it still work on Lenses because we introduce inheritance between optics, so a Lens is an Optional

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I missed that

Copy link
Collaborator

@cquiroz cquiroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julien-truffaut julien-truffaut merged commit 5d6157a into master Feb 25, 2021
@julien-truffaut julien-truffaut deleted the applyN-optional branch February 25, 2021 09:21
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

Successfully merging this pull request may close these issues.

2 participants