Erlang improvement?

Kostis Sagonas kostis@REDACTED
Wed Sep 19 19:08:33 CEST 2001


> | %%===============================================================
> | 
> | t2(M,F) ->
> |   M:F(bar,42).
> | 
> | %%===============================================================
> 
> Let's assume that f(X) returns 'a' and g(Y) returns 'b'.
> Does f(X):g(Y) mean a:g(Y) (call g in module a with parameter Y) or the
> function object a:b? Isn't there an ambiguity here?

There is no ambiguity; to perhaps obfuscate things even more, the
above notation is just "syntactic sugar" for 

t2(M,F) ->
  apply(fun02,f,[bar,42]).


Kostis.




More information about the erlang-questions mailing list