Memoization in Erlang?
Fri Feb 3 10:37:01 CET 2006
Ulf Wiger (AL/EAB) wrote:
>>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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions