Mats Cronqvist mats.cronqvist@REDACTED
Mon Feb 27 13:50:15 CET 2006

   happended upon the description of lists:flatmap/2 (that i've never used), and 
was a bit mystified by the append/1 function used in the description. could it 
be that it should say flatten/1 ?


flatmap(Function, List1) -> Element
Function = fun(A) -> B
List1 = [A]
Element = [B]

flatmap behaves as if it had been defined as follows:

flatmap(Func, List) ->
     append(map(Func, List))

More information about the erlang-questions mailing list