Hi, I reworked my initial proposal according to the comments of Rich. The syntax now looks as follows:
(condp predicate expr test-expr result-expr test-expr :> result-expr ... default-expr) A result-expr is chosen according to (predicate test-expr expr). In the first form, result-expr is simply evaluated and the result is returned. In the second form, result-expr is expected to evaluate to a function. This function gets passed the return value of the predicate call. Whatever the function returns is returned by condp. If no test-expr leads to a success the default-expr is evaluated and the result returned. If no default-expr is supplied an exception is thrown. The patch is attached at the issue tracker. http://code.google.com/p/clojure/issues/detail?id=6#c2 Comments appreciated. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature