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