We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
match-of
defunion
Hi Assuming the following following
(defunion ski S K I (E (lhs ski) (rhs ski)))
, the following code
(defun blah (expr) (match-of ski expr (K K) (I I) (S S) ((E I x) (interpret x))))
interprets I in the (E I x) clause as a variable rather than the I unit type. Or have I missed something (probably)?
I
(E I x)
Thank you!
The text was updated successfully, but these errors were encountered:
Answering my own question (after reading pattern-type) ... the correct way of doing this is:
(defun interpret (expr) (match-of ski expr ((or S K I) expr) ((E (eql I) x) (interpret x))))
(also helpful to read about trivia...)
trivia
Sorry, something went wrong.
No branches or pull requests
Hi
Assuming the following following
, the following code
interprets
I
in the(E I x)
clause as a variable rather than theI
unit type.Or have I missed something (probably)?
Thank you!
The text was updated successfully, but these errors were encountered: