<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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>
</body>
</html>