Not sure how helpful this is, but https://github.com/danluu/funarg has examples of defining and calling functions, given the name/body of the desired function. (The name is given as a string, so this code is to allow for arbitrarily named functions.)
-- Leah On Fri, Jan 31, 2014 at 6:53 AM, Zac <[email protected]> wrote: > Hey, I was trying to do something quite similar but ran into some problems. > I have some code that generates two expressions, the left and right hand > side of a function definition: > i.e. > farg = :(f(a,b,c,..)) > texpr = :[a+b; a-b*c...] > but I need a way to generate this function without 'eval'ing it (i.e. > using a macro). However, when I try to do this I can only seem to generate > a function that returns the function expression (:[..df]) > > any ideas? >
