On 07/28/2011 06:34 PM, Tuba Lambanog wrote:

The determination of whether a called function will apply is left as a
responsibility of the function itself, rather than the calling
function. The motivation is that a function may be called from a
number of places. Perhaps there's a better way?

The called function cannot decide to not be applied, but it may either evaluate to its argument (assuming unary), or a value derived from that argument.

I guess pattern matching would be nice here, but even without, you could perhaps split the conditions from the actions. Is there any reason to test additional rules after one matches, or would it be beneficial to stop after a match? That would make it similar to URL routing like e.g. Moustache does it.

From your description, it did sound like you want to call the 2nd function with the original argument, not the result of the 1st function. But how would you accumulate all the results, then?


--
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

--
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