Skip to content

Conversation

@sabiwara
Copy link
Contributor

I noticed a couple of places where we were building intermediate lists which could be done in a single pass.


defp iterator_non_disjoint_intersection?(:none, _map), do: false

defp map_or([head | tail], fun) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defp map_or([head | tail], fun) do
defp non_empty_map_or([head | tail], fun) do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@gldubc gldubc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@sabiwara sabiwara merged commit f94f4d5 into elixir-lang:main Jan 27, 2025
9 checks passed
@sabiwara sabiwara deleted the descr-refactor branch January 27, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants