Redirecting functions calls ?

Vance Shipley vances@REDACTED
Fri Apr 23 17:22:51 CEST 2004

Can someone tell me what this is supposed to do?
(Apart from what was requested :)

I really fail to see what is being attempted here.
'fred' is a guard expression.  I see that a valid
guard expression is "constants (terms and bound
variables) all regarded as false".  So wouldn't
the the following be equivalent (and more clear)?

	test(A) when false ->

As I read it you have a function with one clause
which will never match and so never be called.


Sean Hinde <sean.hinde@REDACTED> writes:
} -module(compiler_bug).
} -export([test/1, wow/1]).
} test(A) when fred ->
}      {ok, A}.
} wow(A) ->
}      wow.

More information about the erlang-questions mailing list