Proposed change to libraries

Kostis Sagonas <>
Tue Feb 8 11:28:30 CET 2005


Björn Gustavsson wrote:

 > Seems like good solution to me. It should be easy to implement.
 > 
 > Kostis, would that solution work for Dialyzer?

Yes, it will.

However, apparently I am missing the obvious, because I do not see
how this is easier (though I see that it is more elegant) to
implement than what we were essentially discussing yesterday...

The key question is: does "is_applicable({M,F}, 1)" always check that
the M:F/1 is a valid fun (and succeeds accordingly) or not?


 > "Richard A. O'Keefe" <> writes:
 > [...]
 > > We need
 > >   is_applicable(F, N)
 > >     - succeeds or returns true when N is a non-negative integer
 > >       and F is such that F(T1,...,TN) would make sense
 > >     - fails or returns false otherwise
 > >   is_applicable(F)
 > >     - succeeds or returns true when there exists an N such that
 > >       is_applicable(F, N) would succeed or return true
 > >     - fails or returns false otherwise
 > > 
 > > Then
 > >     map(F, [F|T]) -> [F(H)|map(F,T)];
 > >     map(F, []) when is_applicable(F, 2) -> [].

(I am assuming the "2" above is just a typo and should read "1" BTW).

Kostis




More information about the erlang-questions mailing list