Fun, fun, Funs?

Torbjorn Tornkvist tobbe@REDACTED
Thu Sep 28 08:22:27 CEST 2000


Perhaps I should add that this example will give a compiler
warning since the 'X' in '..fun(X)..' will shadow the 'X'
in 'double_list(X)...'. Here is an example which don't
give you a Warning.

double_list(L) when list(L) ->
    F = fun(X) -> X*2 end,
    lists:map(F,L).

/Tobbe




More information about the erlang-questions mailing list