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

Simplify client code interaction with bitemporal objects. #53

Open
sageserpent-open opened this issue Feb 8, 2019 · 0 comments
Open

Comments

@sageserpent-open
Copy link
Owner

Currently all bitemporal objects are rendered into streams of matching items by a scope - these may be empty, or yield one or more objects. We already have distinct bitemporals for an expected number of yielded items, these should return more specific types than just a stream.

So 'Scope.render' would be furnished with overloads that return, say:-

zeroOrOne[X] ----> Option[X]

atLeastOne[X] ----> Nel[X]

one[X] ----> X

This then avoids the tedious '.head' calls that are currently scattered around the codebase, and which act as a barrier to comprehending the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant