-
Notifications
You must be signed in to change notification settings - Fork 6
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
More general list matching #7
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be really nice if we could write patterns like this:
[xs..., p(x), ys...]
This would match the first p(x) in the list. It's important here that matching is not greedy. Some ad-hoc support could be implement, but it gets quickly more challenging to cover all cases correctly. I believe we should compile the patterns into an automaton like regular expressions. The design of this would need to be worked out in some more detail.
Some quick thoughts:
The text was updated successfully, but these errors were encountered: