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

Make Distribution.get public #26

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

fdietze
Copy link
Contributor

@fdietze fdietze commented Mar 19, 2022

This allows to avoid List creation using sample if only one sample is needed. Does it have any downsides to use get directly?

Or would it be better to provide an extra method like singleSample or similar?

@jliszka
Copy link
Owner

jliszka commented Apr 2, 2022

Yeah it's somewhat intentional... to force people to use monadic operations (map/filter/flatMap) and stay "in" the monad as long as possible, rather than writing their own loops where they draw samples and aggregate. In that case I think singleSample would be fine.

@fdietze
Copy link
Contributor Author

fdietze commented Apr 4, 2022

@jliszka It's ready to merge.

@jliszka jliszka merged commit 4ddb852 into jliszka:master Apr 5, 2022
@fdietze fdietze deleted the get-public branch April 19, 2022 18:06
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.

2 participants