Redirecting functions calls ?
Fri Apr 23 12:32:39 CEST 2004
> 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) ->
> bar(Y) ->
> 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
Maybe I'm being too simplistic, as I don't really understand the
discussion that followed about the compiler bug, but wouldn't this do
what you want:
More information about the erlang-questions