Allow walking & not-walking the whole quote form #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Input needed on this one.
Usually with
riddley.walk/walk-exprs
, I can assume I won't walk an expression unless my predicate allows it. I'm using a set, similar to what proteus does. But in the case ofquote
, I can't avoid walking expressions underneath it.Originally I thought could just tack a
(predicate x)
onto the condition in walk-exprs and add another condition that just returns its argument.But there's more: if you want to be able to walk a
quote
d form, say to replacequote
withfoobar
, it can't currently be done in master (as far as I can tell), and the naïve in the previous paragraph doesn't solve it. This patch does seem to solve it and pass the tests, but I'm pretty sure it breaks the idea of not macroexpanding inside aquote
form. I'm actually having a bit of a hard time writing a test case showing that, but I think I can visualize why it's wrong. So I think sure this isn't really ready for prime time yet, but wanted to get it out there for input & brainstorming.