Erlang improvement?

Samuel Tardieu sam@REDACTED
Wed Sep 19 19:24:28 CEST 2001


On 19/09, Kostis Sagonas wrote:
| > | %%===============================================================
| > | 
| > | 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]).

Maybe I am just tired, but I fail to see how your explanation answers my
question. How is f(X):g(Y) interpreted?




More information about the erlang-questions mailing list