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 involuton #869

Merged
merged 2 commits into from
Jun 23, 2020
Merged

Add Iso involuton #869

merged 2 commits into from
Jun 23, 2020

Conversation

mlrv
Copy link
Contributor

@mlrv mlrv commented Jun 23, 2020

I took a quick stab at #868

I wasn't entirely sure whether involuted (I decided to pick that as opposed to involution to be consistent with haskell) should live on the Iso object or somewhere else, happy to change it if we think it's better placed elsewhere.

@@ -336,6 +336,13 @@ object Iso {
/** alias for [[PIso]] id when S = T and A = B */
def id[S]: Iso[S, S] =
PIso.id[S, S]

/**
* create a [[PIso]] where S = T and A = B from
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the first line of comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As in, is create a [[PIso]] where S = T and A = B redundant? I guess we could change the whole comment block to

/** create a [[Iso]] from a function that is its own inverse */

Copy link
Member

Choose a reason for hiding this comment

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

yep perfect. Maybe an [[ISO]]

@julien-truffaut
Copy link
Member

Thanks @mlrv LGTM

@julien-truffaut julien-truffaut merged commit e88b404 into optics-dev:master Jun 23, 2020
@mlrv mlrv deleted the iso-involution branch June 23, 2020 12:15
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