Iteration over lists

Nick Linker xlcr@REDACTED
Fri Mar 17 10:30:47 CET 2006


Bengt Kleberg wrote:

> On 2006-03-16 17:52, Emil Öberg (LN/EAB) wrote:
> ....deelted
>
>> mapping(L) ->
>>     lists:map({erlang, integer_to_list}, L).
>
>
> i do not think that this use of map/2 is documented. perhaps it is 
> unwise to use it? 

May be implicit apply/2 call takes part here?  The definition of map/2 
is straightforward:

map(F, [H|T]) ->
    [F(H)|map(F, T)];
map(F, []) when is_function(F, 1) -> [].


Best regards,
Linker Nick.



More information about the erlang-questions mailing list