By: Tom Faulhaber
Wow, this is cool! I’ve been meaning to write this myself for a while but never got to it. Too small ideas/suggestions: 1) When writing Clojure, Rich wanted to reduce the number of parens (relative to...
View ArticleBy: tim
@Tom: 1. Yah, I went back and forth on this too. I eventually went with (pattern action) because a) it matches variable-arity function definitions and b) it allows for an implicit do-body for the...
View ArticleBy: Tom Faulhaber
@Tim: On 1, I think that my suggestion has the advantage of consistency with other Clojure forms. It seems that everywhere in Clojure that Rich had the choice he followed the “single-layer model”...
View ArticleBy: fogus
Excellent work. This has been long in coming and I applaud you for the effort. I know what I’ll be playing with this afternoon. :) -m
View ArticleBy: tim
@Tom: Yah, I think you’re right. I tried it out locally and it felt cleaner and more clojurey (if that’s a word). Latest HEAD has the new stripped down syntax. Thanks! @fogus: Thanks very much — enjoy....
View ArticleBy: Tom Faulhaber
@tim; After thinking about it more, my opinion is fuzzier. :-) But I’d leave it with the stripped down syntax for now, since you’ve changed it and see how it feels after some more use. The interesting...
View ArticleBy: Konrad Hinsen
For a somewhat similar idea, see clojure.contrib.types/match: http://richhickey.github.com/clojure-contrib/types-api.html#types/match This is a pattern-matching macro I wrote for working with algebraic...
View ArticleBy: Mikio Hokari
Very good work! Thank you! clojure.contrib.types/match lacks "&" clauses too. (clojure.contrib.types/match [1 2 3 4] [head & tail] (f head tail)) causes error.
View ArticleBy: Today in the Intertweets (Feb 1st Ed) | disclojure: all things clojure
[...] pattern matching (here, via @fogus) — This links to a rather old article on a pattern haskell-esque pattern matching [...]
View ArticleBy: (fast) pattern matching in clojure « Lost in Technology
[...] there already is a macro available for that purpose (see here), that implementation has some limitations which i tried to [...]
View ArticleBy: [Project Euler Problem 4 Solution] Thanks God, Clojure exists!! « Web...
[...] is a semi-trivial, not optimized solution to the problem 4 of Project Euler. Note: you need the pattern-match jar, a wonderful way to bring pattern matching into your Clojure functions. You can...
View ArticleBy: Morgon Kanter
Very nice. I like this way better than Matchure; don’t suppose there’s any chance of getting it into clojure-contrib?
View ArticleBy: tim
@Morgon: Ah, I hadn’t thought about that. I’ll take a look at see if that’s feasible.
View Article
More Pages to Explore .....