2011-12-27 20 views

उत्तर

8

[binary_to_list(X) || X <- [<<"a">>, <<"b">>, <<"c">>]]. या अधिक विस्तृत

 
BinList = [<<"a">>, <<"b">>, <<"c">>], 
NormalList = [binary_to_list(X) || X <- BinList], 
NormalList. 

+1

लिंक /erldocs.com/R15B/erts/erlang.html?i=3#binary_to_list/1। – kay

+0

लिंक 404 परोसता है। संभवतः यह वर्तमान स्थान है http://erlang.org/doc/man/erlang.html#binary_to_list-1 –

2

आप इसे इस प्रकार कर सकते हैं:

A=[<<"a">>, <<"b">>, <<"c">>] 
B=[binary_to_list(Item) || Item <- A] 
5

या, सूची का उपयोग: नक्शा/2: http:/binary_to_list को दस्तावेज

lists:map(fun erlang:binary_to_list/1, [<<"a">>, <<"b">>, <<"c">>]). 
संबंधित मुद्दे