In my case the variable is a record like V = {rec, field1, field2} where rec is indeed a module name with fun() defined in it. So it seems that calling to this record will in turn call the first element?<div><br></div><div>
Thanks</div><div>Andy<br><div><br><br><div class="gmail_quote">On Mon, Jun 27, 2011 at 12:35 PM, Jack Moffitt <span dir="ltr"><<a href="mailto:jack@metajack.im">jack@metajack.im</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">> New to Erlang. I saw some program with statement such as V:fun() which I<br>
> can't find from Joe's Erlang book. I know module:fun() is calling a function<br>
> defined in a module. But do this to a variable is confusing. Does that<br>
> variable define a function, and how?<br>
<br>
</div></div>It is probably bound to an atom, like in this example:<br>
<br>
X = dict,<br>
D = X:new().<br>
<font color="#888888"><br>
jack.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br><div>---------------------------------------------------------------</div><div>有志者,事竟成,破釜沉舟,百二秦关终属楚</div><div>苦心人,天不负,卧薪尝胆,三千越甲可吞吴</div><br>
</div></div>