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

Guards #18

Open
gordon-quad opened this issue Apr 8, 2012 · 2 comments
Open

Guards #18

gordon-quad opened this issue Apr 8, 2012 · 2 comments

Comments

@gordon-quad
Copy link

Something like that

(match x
(((a b c) (eq a b)) (do something when a equals to b))
(((a b c) (eq a outervar)) (do something else when a equals to outervar))
((x t) (do another thing else)))

@gordon-quad
Copy link
Author

or perhaps optional "when" will be much more interesting
(match x (((a b c) (:when (eq a b)) (do something))

@naryl
Copy link

naryl commented Apr 8, 2012

(match x
  ((a b c)
   (:when (eq a b))
   (do something with a b and c)))

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

No branches or pull requests

2 participants