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

add match? predicate #1

Open
swannodette opened this issue May 6, 2010 · 2 comments
Open

add match? predicate #1

swannodette opened this issue May 6, 2010 · 2 comments

Comments

@swannodette
Copy link

You have if-match, but why not add a match? predicate.

@dcolthorp
Copy link
Owner

I've considered the same thing, and may add it. The only reason I haven't is that it would have to be a macro, not a function. This means you wouldn't be able to use it like a function in all but the most basic case. For example, you couldn't pass match? to another function or curry it with something like

(def my-matcher (partial match? [java.lang.String & _]))

No one expects to this type of thing with an if, cond, or when form.

@fdserr
Copy link

fdserr commented Aug 22, 2013

Illumination:
"The only reason I haven't is that it would have to be a macro, not a function. This means you wouldn't be able to use it like a function in all but the most basic case."
Thanks Drew!

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

3 participants