This was a nice question, 
i think i am trying to figure out a way to check if 2 functions (partial 
possibly) are  at the same syntactic location in the AST and their free 
variables refer to the equal/same data



On Friday, February 26, 2016 at 12:02:30 PM UTC-8, Stefan Karpinski wrote:
>
> What are you trying to discover about these functions?
>
> On Fri, Feb 26, 2016 at 2:50 PM, Julia Tylors <[email protected] 
> <javascript:>> wrote:
>
>> Isn't there a trick like i can serialize a partial function and then 
>> check their equality in the serialized form?
>>
>> On Friday, February 26, 2016 at 11:22:37 AM UTC-8, Stefan Karpinski wrote:
>>>
>>> Functions are compared by identity – they are equal if they are the same 
>>> function, and not otherwise. Comparing functions syntactically is shallow 
>>> and nearly useless. Comparing functions by what they compute is 
>>> undecidable. So identity is essentially the only useful way to compare 
>>> functions.
>>>
>>> On Fri, Feb 26, 2016 at 2:09 PM, Julia Tylors <[email protected]> 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I have a simple question. I like to compare functions. For example:
>>>>
>>>> function some_func(x::Target, y::Config, z::Int64)
>>>>    #some code here
>>>> end
>>>>
>>>> #some partialization here
>>>> f1 = (x::Target,y::Config) -> some_func(x,y,5)
>>>> f2 = (x::Target,y::Config) -> some_func(x,y,4)
>>>>
>>>>
>>>> I want to evaluate the following expression:
>>>>
>>>> f1 == f2 
>>>>
>>>>
>>>> Thanks
>>>>
>>>
>>>
>

Reply via email to