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 asLeftF, asRightF, noneF, someF methods #282

Merged
merged 7 commits into from
Dec 16, 2021
Merged

Add asLeftF, asRightF, noneF, someF methods #282

merged 7 commits into from
Dec 16, 2021

Conversation

danicheg
Copy link
Member

This adds asLeftF, asRightF, noneF, someF methods to AnySyntax, FEitherSyntax and FOptionSyntax.
Those methods are utterly useful in daily programming. They're replacing such constructs as:

none[Int].pure[F] // noneF
42.some.pure[F] // 42.someF
"foo".asLeft[Int].pure[F] // "foo".asLeftF

@benhutchison
Copy link
Member

Not specifically related to this PR, but I note the general expansion of "lift operators" in mouse is not reflected in the old bare-bones example set in the README.

A new approach to documenting mouse is needed, I think, so that the library functions become more discoverable for "non-expert" users.

@danicheg danicheg merged commit 86101a9 into main Dec 16, 2021
@danicheg danicheg deleted the f-either-option branch December 16, 2021 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants