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
prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b prism setter getter pab = dimap getter (either id setter) (right pab)
Then there won't be unnecessary rmap preprocessing.
rmap
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b lens getter setter pab = dimap (\s -> (getter s, s)) (\(b, s) -> setter s b) (first' pab)
and here we won't apply setter to s before actually needed (making of pair is unavoidable)
setter
s
The text was updated successfully, but these errors were encountered:
That sounds like an improvement to me.
Sorry, something went wrong.
No branches or pull requests
Then there won't be unnecessary
rmap
preprocessing.and here we won't apply
setter
tos
before actually needed (making of pair is unavoidable)The text was updated successfully, but these errors were encountered: