On Tue, Oct 11, 2011 at 08:46:51PM +0800, Ambrose Bonnaire-Sergeant wrote:
> (match ["asdf"]
>            (["asdf"] :when (fn [a] ..))  1)   ;; <- illegal, cannot wrap
> pattern row in list
> 
> If we can resolve this, it would be great!
> 
> Thanks,
> Ambrose
> 

I see a couple of options..

1. Scan for non vector pattern rows (and &rest), and if they exist, wrap
everything in vectors (seems needlessly complex)

2. Change the implementation to remove the specialness of 'pattern rows'. 
Consider a literal vector with vector patterns as a case to optimize (seems
like a lot of work)

3. match + match-1

The weight of the implementation details hadn't occurred to me. When first
using match, I got tripped up by it expecting a vector. However, I've been
happily using match-1 since then. Given that a unification of the two in the
future would be backwards compatible, perhaps it's not even worth worrying
about.

Steve

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to