Hello everybody,

I would like to create a function from an arbitrary s-expression for example
if I have something like

(def x 10)
(let [y 20]
  (create-fn-from-sexp '(+ x y z)))

I would like create-fn-from-sexp to return a function which is a function of
the third argument z .. since both x and y are both bound in this lexical
scope . Is it possible to write such a function?  If the create-fn-from-sexp
worked correctly the above code would be equivalent to


(def x 10)
(let [y 20]
 (fn [z] (+ x y z))

Is it possible to write such a function?

thanks
Sunil.

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