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

Suggestions for examples related to Arrow's integration docs #24

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

raulraja
Copy link
Contributor

This PR updates the Arrow integration documentation, focusing on demonstrating multiple bind operations. The aim is to show how Akkurate handles validations involving more than one operation.

The previous example with a single bind not consuming its result is usually considered an antipattern. In general, binding is only helpful inside an either block if there is more than one value to bind, and the second and further operations are somehow dependent on the results of previous operations.

Here, we assume that for some reason, you should not attempt to validate an author unless you have previously validated a book—still not the best example. The examples can be improved to show an actual use case of dependent monadic operations. Also, the examples may be expanded to include Raise vs. using either blocks and the use of context-receivers.

@PoisonedYouth
Copy link

Raise should definitely be added to the examples section.

@nesk nesk merged commit ff076f6 into nesk:main Dec 15, 2023
5 of 6 checks passed
@nesk
Copy link
Owner

nesk commented Dec 15, 2023

Thank you @raulraja! 🙏

I took the liberty to alter your examples to fit the styleguide and avoid lines with too much width, but your examples are still there. I've also improved the KDoc for the bind function, based on what you already did in the markdown.

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.

3 participants