More complex pattern matching in match statement.#242
More complex pattern matching in match statement.#242gerau wants to merge 2 commits intoBlockstreamResearch:masterfrom
Conversation
|
I haven't reviewed the implementation, but I did test this with my specific motivating use-case and it worked great empirically. I also tested the It's still too bad that we don't have a cleaner way to test equality of complex data types (see #245), but this makes these functions a lot more readable than they were before. |
|
I've written some documentation for this which we can merge at the same time as we merge this PR. BlockstreamResearch/simplicity-lang-org#41 This also inspired #250 as a further (more difficult) feature request related to |
Closes #240 and #241.
Implementing this was easy enough, because we already have the logic for this pattern matching in assignments, so we simply reused it. Also existing logic allows us to use
_for unused variable.