It's a little complicated scenario to explain. It's like this:

I have a macro that replaces an expression with a function whose name isn't 
fixed / known / is anonymous / created inside a closured scope. Later on I 
want the ability to add methods to this.



On Friday, July 24, 2015 at 12:57:01 AM UTC+5:30, Tom Breloff wrote:
>
> Can you tell us more about your end-goal?  I have a feeling that you're 
> not thinking about this in a Julian way, but I'm not entirely sure what you 
> want to be able to do.
>
> On Thu, Jul 23, 2015 at 3:21 PM, Vinuth Madinur <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> Is there a way to add a method to a generic function during runtime? Or 
>> to merge two generic functions? For example:
>>
>>
>> function abc end
>> function xyz end
>>
>> function add_method(method, func)
>>       #Add method to func
>> end
>>
>> add_method(xyz) do x::Int
>>    x*2
>> end
>>
>> or
>>
>> add_method(x -> x * 4, abc)
>>
>>
>> Thanks,
>> Vinuth.
>>
>>
>>
>>
>

Reply via email to