We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
as
Something like
def as[Source, Target <: Source]: Prism[Source, Target] = { Prism[Source, Target]( source => if (source.isInstanceOf[Target]) Some(source.asInstanceOf[Target]) else None)( target => target.asInstanceOf[Source]) }
Also add syntax extension methods on to the optics, in the style of each, some, index, etc. Also, on to the ApplyXXX versions.
each
some
index
ApplyXXX
It should commute with the Focus macro such that Focus[Foo](_.bar.as[Baz]) == Focus[Foo](_.baz).as[Baz]
Focus[Foo](_.bar.as[Baz]) == Focus[Foo](_.baz).as[Baz]
The text was updated successfully, but these errors were encountered:
Resolved by #1110
Sorry, something went wrong.
No branches or pull requests
Something like
Also add syntax extension methods on to the optics, in the style of
each
,some
,index
, etc. Also, on to theApplyXXX
versions.It should commute with the Focus macro such that
Focus[Foo](_.bar.as[Baz]) == Focus[Foo](_.baz).as[Baz]
The text was updated successfully, but these errors were encountered: