Search in record list
Mon Mar 20 06:22:04 CET 2006
On 2006-03-18 16:41, Kostis Sagonas wrote:
> IMO, the compiler, to the extent it can, should warn about redundant
> clauses. Currently, there is a check for redundant clauses, but it
> is very rudimentary. It can be improved. For example, the compiler
> could warn for the above and also for `similar' functions as e.g.
> b(N) when is_number(N) -> number;
> b(I) when is_integer(I) -> integer.
is it documented that function cluses are tried in the order they are
otherwise i think that it would be nice if the compiler could
''rearrange'' these 2 cluses for me, so that
b(1) => integer
More information about the erlang-questions