Doh...
--
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 t
On Tue, Dec 8, 2009 at 3:51 PM, Krukow wrote:
> I am writing a function that has to wrap other code. One simple
> approach is to do
>
> user> (defn wrap-fun [f]
> (fn [& args]
> (println "pre-processing")
> (let [res (apply f args)]
> (println "post-processing")
I am writing a function that has to wrap other code. One simple
approach is to do
user> (defn wrap-fun [f]
(fn [& args]
(println "pre-processing")
(let [res (apply f args)]
(println "post-processing")
res)))
#'user/wrap-fun
user> (def w (wrap-fun