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