> 3. Making your example work would necessitate discovering which of the
> symbols in the (+ a b) form are to be treated as formal arguments. In
> this case, the answer would be a (to be bound to 3) and b (to be bound
> to 4). In general, that's very nearly impossible, as any symbol not in
> your replacements map may equally well be a function which you don't
> want to replace.

I take your point; I've given up trying to actually define a function
with the expression for the moment (I'd imagine it's still possible,
just much trickier than I thought).  My intention was to fake operator
overloading.  For my purposes it should be enough to evaluate the
expression with substituted functions, which is very easy:

(defmacro subFuncs [arg1 arg2]
  (eval `(replace ~arg1 ~arg2))
  )

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