<HTML><HEAD>
<META content="text/html charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Microsoft Jhenghai'; COLOR: #000000; FONT-SIZE: 10pt">
<DIV><FONT size=3 face=Arial>Hi, Work :</FONT></DIV>
<DIV><FONT size=3 face=Arial></FONT> </DIV>
<DIV><FONT size=3 face=Arial>Again, thank you so much !</FONT></DIV>
<DIV><FONT size=3 face=Arial></FONT> </DIV>
<DIV><FONT size=3 face=Arial>Ha, Ha ! Great ! It really work
!</FONT></DIV>
<DIV><FONT size=3 face=Arial></FONT> </DIV>
<DIV><FONT size=3 face=Arial>best regards. </FONT></DIV>
<DIV><FONT size=3 face=Arial></FONT> </DIV>
<DIV><FONT size=3 face=Arial><A
href="mailto:hoe@thingclear.com">hoe@thingclear.com</A><FONT size=2
face="Microsoft Jhenghai"> 2013.12.0</FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT
face=Arial>---------------------------------------------------------------------------------</FONT></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=elbrujohalcon@inaka.net
href="mailto:elbrujohalcon@inaka.net">Work</A> </DIV>
<DIV><B>Sent:</B> Wednesday, December 04, 2013 1:46 AM</DIV>
<DIV><B>To:</B> <A title=patrick.schless@gmail.com
href="mailto:patrick.schless@gmail.com">Patrick Schless</A> </DIV>
<DIV><B>Cc:</B> <A title=hope@thingclear.com
href="mailto:hope@thingclear.com">hope@thingclear.com</A> ; <A
title=erlang-questions@erlang.org
href="mailto:erlang-questions@erlang.org">erlang-questions</A> </DIV>
<DIV><B>Subject:</B> Re: [erlang-questions] strange result of
lists:map(fun(X)-> 20*X end, [2, 4, 6, 8]).</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">Yeah,
this should work:
<DIV> </DIV>
<DIV><SPAN style="WHITE-SPACE: pre"
class=Apple-tab-span></SPAN>io:format("~w~n", [lists:map(fun(X)-> 20*X
end,L)]).
<DIV>
<DIV>
<DIV> </DIV>
<DIV>
<DIV>On Dec 3, 2013, at 14:41, Patrick Schless <<A
href="mailto:patrick.schless@gmail.com">patrick.schless@gmail.com</A>>
wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV dir=ltr>In cases like this, is there a way to explicitly show the result
as numbers (as Hope expected)?<BR></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Tue, Dec 3, 2013 at 9:24 AM, Work <SPAN
dir=ltr><<A href="mailto:elbrujohalcon@inaka.net"
target=_blank>elbrujohalcon@inaka.net</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="Z-INDEX: auto; POSITION: static; BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV style="WORD-WRAP: break-word">
<DIV>Hi!</DIV>
<DIV> </DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN>Since strings in Erlang are
just lists of integers, and the results of some of your tests are proper
lists of strings, they’re *displayed* as strings.</DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN>In other words "(Px?" = [40,
80, 120, 160]</DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN>Hope that helps :)</DIV>
<DIV><SPAN style="WHITE-SPACE: pre-wrap"></SPAN>For reference, check this:
<A href="http://learnyousomeerlang.com/starting-out-for-real#lists"
target=_blank>http://learnyousomeerlang.com/starting-out-for-real#lists</A></DIV>
<DIV> </DIV>
<DIV>
<DIV>
<DIV class=h5>
<DIV>On Dec 3, 2013, at 12:13, <<A href="mailto:hope@thingclear.com"
target=_blank>hope@thingclear.com</A>> <<A
href="mailto:hope@thingclear.com" target=_blank>hope@thingclear.com</A>>
wrote:</DIV>
<DIV> </DIV></DIV></DIV>
<BLOCKQUOTE type="cite">
<DIV>
<DIV class=h5>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Microsoft Jhenghai'; FONT-SIZE: 10pt">
<DIV><FONT face="Microsoft Jhenghai">Hi, </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Microsoft Jhenghai">I am a beginner, and I got some
strange result like this :</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV>1> L=[2,4,6,8].</DIV>
<DIV>[2,4,6,8]</DIV>
<DIV>2> lists:map(fun(X)-> 20*X end,L).</DIV>
<DIV>"(Px?"</DIV>
<DIV>3> lists:map(fun(X)-> 21*X end,L).</DIV>
<DIV>"*T~‥"</DIV>
<DIV>4> lists:map(fun(X)-> 27*X end,L).</DIV>
<DIV>"6l¢O"</DIV>
<DIV>5> lists:map(fun(X)-> 28*X end,L).</DIV>
<DIV>"8p‥a"</DIV>
<DIV>6> lists:map(fun(X)-> 29*X end,L).</DIV>
<DIV>":tRe"</DIV>
<DIV>7> lists:map(fun(X)-> 30*X end,L).</DIV>
<DIV>"<x’e"</DIV>
<DIV>8> lists:map(fun(X)-> 31*X end,L).</DIV>
<DIV>">|oo"</DIV>
<DIV>9> lists:map(fun(X)-> 32*X end,L).</DIV>
<DIV>[64,128,192,256]</DIV>
<DIV>10> lists:map(fun(X)-> 22*X end,L).</DIV>
<DIV>[44,88,132,176]</DIV>
<DIV>11> lists:map(fun(X)-> 23*X end,L).</DIV>
<DIV>[46,92,138,184]</DIV>
<DIV>12> lists:map(fun(X)-> 24*X end,L).</DIV>
<DIV>[48,96,144,192]</DIV>
<DIV>13> lists:map(fun(X)-> 25*X end,L).</DIV>
<DIV>[50,100,150,200]</DIV>
<DIV>14> lists:map(fun(X)-> 26*X end,L).</DIV>
<DIV>[52,104,156,208]</DIV>
<DIV>15> lists:map(fun(X)-> 27*X end,L).</DIV>
<DIV>"6l¢O"</DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai">-------------------</FONT></DIV>
<DIV>Erlang R16B02 (erts-5.10.3) [smp:2:2] [async-threads:10]</DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT></DIV>
<DIV>Eshell V5.10.3 (abort with ^G)</DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai">-------------------</FONT></DIV>
<DIV>Windows Vista</DIV>
<DIV><FONT face="Microsoft Jhenghai">-------------------</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai">Can someone help me ?</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai">Thanks a lot !</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai">best regards.</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT face="Microsoft Jhenghai"><A href="mailto:hope@thingclear.com"
target=_blank>hope@thingclear.com</A> 2013.12.03</FONT></DIV>
<DIV><FONT face="Microsoft Jhenghai"></FONT> </DIV>
<DIV><FONT
face="Microsoft Jhenghai"></FONT> </DIV></DIV></DIV></DIV></DIV></DIV>_______________________________________________<BR>erlang-questions
mailing list<BR><A href="mailto:erlang-questions@erlang.org"
target=_blank>erlang-questions@erlang.org</A><BR><A
href="http://erlang.org/mailman/listinfo/erlang-questions"
target=_blank>http://erlang.org/mailman/listinfo/erlang-questions</A><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV><BR>_______________________________________________<BR>erlang-questions
mailing list<BR><A
href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</A><BR><A
href="http://erlang.org/mailman/listinfo/erlang-questions"
target=_blank>http://erlang.org/mailman/listinfo/erlang-questions</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>