<div dir="ltr">Thank you! I see now. </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 21, 2017 at 7:17 PM, Richard A. O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 21/02/17 10:15 PM, Hakim Fajardo wrote:<br>
(simplified):<br>
<br>
prices([]) -><br>
io:format("List is empty~n");<br>
prices(L) when is_list(L) -><br>
io:format("The average equals ~n", lists:sum(L)/length(L)).<br>
^^^^^^^^^^^^^^^^^^^^^^^<br>
<br>
% man io<br>
format(Format, Data) -> ok<br>
Data = [term()]<br>
<br>
The second argument of io:format/2 should be a list.<br>
<br>
What part of the format says to expect a number?<br>
What part of the format says how to print a number?<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</div></div></blockquote></div><br></div>