how to get [3,5] from [ ["3"], ["5"] ]

MEENA SELVAM meena_selvam@REDACTED
Sun Aug 7 06:27:30 CEST 2005


Hi,
I need to extract the first element of every tuple, in
a tuplelist in the format[a,b]

what I have is:

FirElem = fun(X)->
            {C,_} = X,
            C
          end.

lists:map(FirElem,[{["3"],["red"]},{["5"],["yellow"]}]).

which gives [["3"],["5"]]

But I require to make a list [3,5] for which I do not
find any BIF or functions( to convert [["3"],["5"]].
Any suggestions?

meena


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



More information about the erlang-questions mailing list