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 insert_if_absent method to Map #1519

Merged
merged 2 commits into from
Jan 25, 2017
Merged

Add insert_if_absent method to Map #1519

merged 2 commits into from
Jan 25, 2017

Conversation

SeanTAllen
Copy link
Member

@SeanTAllen SeanTAllen commented Jan 18, 2017

Allows for a speed improvement by saving a Map lookup when using
this pattern:

if not my_map.contains(my_key) then
  my_map(my_key) = my_value
end

Allows for a speed improvement by saving a Map lookup when using
this pattern:

if not my_map.contains(my_key) then
  my_map(my_key) = my_value
end
@SeanTAllen SeanTAllen added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Jan 18, 2017
@sylvanc sylvanc merged commit aa34777 into master Jan 25, 2017
ponylang-main added a commit that referenced this pull request Jan 25, 2017
@SeanTAllen SeanTAllen deleted the map-insert_if_absent branch June 7, 2018 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - added Automatically add "Added" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants