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

Make a hyperbracketed taffy-match-related? operation #10

Open
rocketnia opened this issue Mar 1, 2022 · 0 comments
Open

Make a hyperbracketed taffy-match-related? operation #10

rocketnia opened this issue Mar 1, 2022 · 0 comments

Comments

@rocketnia
Copy link
Collaborator

rocketnia commented Mar 1, 2022

We could use a hyperbracketed operation to check that several given values match the same match pattern and that their components are related according to some given comparison functions:

(taffy-match-related? (list a b c) `(cons ,free-identifier=? (cons ,< ,(lambda _ #t))))

This could also have multiple hyperbracketed parts representing different match clauses to try. All the inputs must match the same clause for it to count as a successful match.

It might be better to call this taffy-match=? since it'll tend to be an equivalence check if the interpolated comparisons are equivalence checks.

If there's only one match clause, it also might be better to call this taffy-match-and? or taffy-match-zip-and? since it's a conjunction of the interpolated comparisons. However, if there's more than one match clause, it has some or semantics to it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant