<div dir="ltr"><span class="Apple-style-span" style="font-family: Verdana; font-size: 16px; "><pre style="font-family: courier; font-weight: normal; "><span class="Apple-style-span" style="font-family: arial; font-size: 13px; white-space: normal; ">Hi,</span></pre>
</span><div>You can do :</div><div>1> lists:zipwith(fun(X,Y) -> X+Y end, [1,2,3], [4,5,6]).</div><div>[5, 7, 9]<br></div><div><br></div><div>Does it help ?</div><div><br></div><div>Regards,</div><div>-- Sylvain</div>
<div><br><div><div class="gmail_quote">2008/7/23 Circular Function <<a href="mailto:circularfunc@yahoo.se">circularfunc@yahoo.se</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>in python I can do:<br>>>> map(lambda x,y:x+y,[1,2,3],[4,5,6])<br>[5, 7, 9]<br>>>> <br><br>38> lists:map(fun(X,Y) -> X+Y end,[1,2],[3,4]).<br>
** exception error: undefined function lists:map/3<br>39> <br><br>isnt there general map-function that map is derived from that I can use? <br>what about listcomprehensions?<br>44> [X+Y || X,Y <- lists:seq(1,10),lists:seq(1,10)].<br>
* 1: variable 'X' is unbound<br>45> </div></td></tr></tbody></table><br>
      <hr size="1">
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.<br>
<a href="http://www.kelkoo.se/c-100015813-bredband.html?partnerId=96914325" target="_blank">Sök och jämför priser hos Kelkoo.</a><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br></div></div></div>