There are two points about your question:<br><br>1. It is not strange that you cannot find such a function, it does not exist in the libraries. :-)<br><br>2. It may also be strange that one does not exist, but so far no one has seen a need to add it to lists where it would belong.<br>
<br>Robert<br><br><div class="gmail_quote">2008/12/23 Maxim Treskin <span dir="ltr"><<a href="mailto:zerthurd@gmail.com">zerthurd@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br><br>I can't find standard function which returns position of element in list like:<br><br>num(El, List) -><br>    num(El, List, 1).<br><br>num(_, [], _) -> {error, not_found};<br>num(El, [H|T], Acc) -><br>

    case H of<br>        El -> Acc;<br>        _ -> num(El, T, Acc+1)<br>    end.<br><br>I think it strange. Can you clarify this point?<br><br>Thank you.<br><br>-- <br><font color="#888888">Maxim Treskin<br>
</font><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>