Memoization in Erlang?

Thomas Johnsson <>
Fri Feb 3 10:37:01 CET 2006


Ulf Wiger (AL/EAB) wrote:

>Thomas Johnsson
>  
>
>>What, you can do function equality in Erlang??
>>I hadn't realized....
>>    
>>
>
>You mean I actually have to verify my
>suggestions before posting them?  ;)
>
>I will admit that I just plainly assumed
>that it would work. My original suggestion
>was to use erlang:fun_info(F) as a key.
>
>  
>
>>That's highly dubious ... When are two function
>>equal according the the Erlang implementation?
>>    
>>
My point was that it *shouldn't* work (:-)
The traditional view is that two function are equal iff for same 
arguments they return the same result.
Ie undecidable since the number of possible arguments is infinite.
In my opinion, in Erlang an attempt to compare two functions should 
cause a run time error.

-- Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060203/8ce3d540/attachment.html>


More information about the erlang-questions mailing list