Redirecting functions calls ?

yerl@REDACTED yerl@REDACTED
Thu Apr 22 23:39:55 CEST 2004


Hi All,
Is there a method to redirect the call of a function and execute another one instead.
For exemple, lets assume 2 functions "foo" and "bar":

foo(X) ->
 blablabla,
 26.

bar(Y) ->
 blablabla,
 38.

When calling foo(10), I want to intercept this call and replace with bar(10). Of course, the result of foo(10) is replaced by the one of bar(10).

Can anyboby help me!

Thanks
Yerl




More information about the erlang-questions mailing list