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

Return Bool from insert indicating whether the value was inserted or not #19

Open
bennofs opened this issue Sep 13, 2014 · 2 comments
Open

Comments

@bennofs
Copy link

bennofs commented Sep 13, 2014

Currently, the insert function has () as return type. However, it's often useful to know whether the value was actually inserted (didn't exist yet) or not. I think this should be easy to determine while inserting.

@gregorycollins
Copy link
Owner

Right now insert always inserts, i.e. it is really replace. That won't change without a major API overhaul.

@bennofs
Copy link
Author

bennofs commented Jul 29, 2016

yeah, but it could still return a Maybe a perhaps with the old value?

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

No branches or pull requests

2 participants