You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest that both symbols and vectors should by default use equality tests in patterns, rather than be treated as predicate functions (both symbols and vectors implement AFn).
For example, I think it's natural if I want to match an empty vector to do something like this:
user=> (se/exec (se/cat []) (list []))
Execution error (IllegalArgumentException) at net.cgrand.seqexp/boot-grouping-vm$step$fn (seqexp.clj:352).
Key must be integer
On the other hand, I can't imagine ever wanting something like this:
I suggest that both symbols and vectors should by default use equality tests in patterns, rather than be treated as predicate functions (both symbols and vectors implement AFn).
For example, I think it's natural if I want to match an empty vector to do something like this:
On the other hand, I can't imagine ever wanting something like this:
Similarly, I think it's natural to expect symbols to act like keywords. Contrast:
with:
The text was updated successfully, but these errors were encountered: