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

improvement: allow modifications of supertree in Zipper.within/2 #157

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

zachdaniel
Copy link
Contributor

@zachdaniel zachdaniel commented Jul 19, 2024

We have our own version of within/2 in igniter for unrelated reasons, but I thought this improvement might be welcome.

We have a situation where we want to both:

  1. preserve the original location
  2. modify the "surrounding code".

By using the returned zipper's supertree (if present), we allow this kind of modification.

@doorgan
Copy link
Owner

doorgan commented Jul 19, 2024

This sounds good! Can we add a test for the use case?

@zachdaniel
Copy link
Contributor Author

Can do :) I will add one next week.

@zachdaniel
Copy link
Contributor Author

@doorgan done :)

@doorgan
Copy link
Owner

doorgan commented Jul 22, 2024

Awesome, thank you! 💜

@doorgan doorgan merged commit 04ffeeb into doorgan:main Jul 22, 2024
6 checks passed
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