<div>Try:</div>
<div>> [mymath:power(X, Y) || X <- [1,2,3] Y <- 3].</div>
<div><br>> [mymath:cube(X) || X <- [1,2,3]]. </div>
<div><br>> [mymath:sq(X) || X <- [1,2,3]].<br><br> </div>
<div>Kind regards</div>
<div>Andreas Hillqvist<br> </div>
<div><span class="gmail_quote">Den 2008-06-18 skrev <b class="gmail_sendername">Circular Function</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:circularfunc@yahoo.se" target="_blank">circularfunc@yahoo.se</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">how do i use a predefined function in a listcomprehension?<br><br>and if i have 2 variables how do I write then?<br><br><br>42> c(mymath). <br>{ok,mymath}<br>43> [mymath:power || X <- [1,2,3] Y <- 3].<br>
* 1: syntax error before: Y<br>43> [mymath:power || X <- [1,2,3], Y <- 3].<br>* 1: illegal expression<br>44> [mymath:cube || X <- [1,2,3]]. <br>* 1: illegal expression<br>45> [X*2 || X <- [1,2,3]]. <br>
[2,4,6]<br>46> [X*X || X <- [1,2,3]].<br>[1,4,9]<br>47> [X*2 || X <- [1,2,3]]. <br>[2,4,6]<br>48> [mymath:sq || X <- [1,2,3]].<br>* 1: illegal expression<br>49> <br></td></tr></tbody></table><span><br>
<hr size="1">
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://shopping.yahoo.se/c-100015813-bredband.html?partnerId=96914325" target="_blank">Sök och jämför hos Yahoo! Shopping.</a></span><br>
_______________________________________________<br>erlang-questions mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>