<html><head></head><body bgcolor="#FFFFFF"><div>You don't need to export it, if you use it in the same module...</div><div><br><div>--</div>Was on the go</div><div><br>On 23 sept. 2012, at 03:37, Michael Truog <<a href="mailto:mjtruog@gmail.com">mjtruog@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
On 09/22/2012 05:07 PM, James Rosenblum wrote:
<blockquote cite="mid:1348358830.31087.YahooMailNeo@web181201.mail.ne1.yahoo.com" type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii">
<div>
<div>Kind people,</div>
<div><br>
</div>
<div>Is there an appreciable difference in these two ways of
passing a function?</div>
<div><br>
</div>
<div>F = fun(A,B) -> my_function(A,B) end.</div>
<div>lists:map(F, Lst)</div>
<div><br>
</div>
<div>vs.</div>
<div><br>
</div>
<div>-export([my_function/2]).</div>
<div><br>
</div>
<div>lists:map(fun my_function/2, Lst)</div>
<br>
</div>
</blockquote>
From
<a class="moz-txt-link-freetext" href="http://www.erlang.org/doc/efficiency_guide/functions.html#id67199">http://www.erlang.org/doc/efficiency_guide/functions.html#id67199</a><br>
"Calls to local or external functions are the fastest kind of
calls."<br>
So, the second solution is best.<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></body></html>