Defining a function in  a macro