[erlang-questions] missing function

French, Mike Mike.French@REDACTED
Tue Dec 23 14:00:14 CET 2008


string:chr ?

Mike

> -----Original Message-----
> From: erlang-questions-bounces@REDACTED
> [mailto:erlang-questions-bounces@REDACTED]On Behalf Of 
> Serge Aleynikov
> Sent: 23 December 2008 12:39
> To: Robert Virding
> Cc: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] missing function
> 
> 
> There's been a discussion about very same subject in this thread:
> 
> http://www.erlang.org/pipermail/erlang-questions/2008-November
> /040189.html
> 
> I also hope OTP folks can include it in the lists module.
> 
> Serge
> 
> Robert Virding wrote:
> > There are two points about your question:
> > 
> > 1. It is not strange that you cannot find such a function, 
> it does not exist
> > in the libraries. :-)
> > 
> > 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.
> > 
> > Robert
> > 
> > 2008/12/23 Maxim Treskin <zerthurd@REDACTED>
> > 
> >> Hello
> >>
> >> I can't find standard function which returns position of 
> element in list
> >> like:
> >>
> >> num(El, List) ->
> >>     num(El, List, 1).
> >>
> >> num(_, [], _) -> {error, not_found};
> >> num(El, [H|T], Acc) ->
> >>     case H of
> >>         El -> Acc;
> >>         _ -> num(El, T, Acc+1)
> >>     end.
> >>
> >> I think it strange. Can you clarify this point?
> >>
> >> Thank you.
> >>
> >> --
> >> Maxim Treskin
> >>
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questions@REDACTED
> >> http://www.erlang.org/mailman/listinfo/erlang-questions
> >>
> > 
> > 
> > 
> --------------------------------------------------------------
> ----------
> > 
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 

Thales UK Ltd (Wells) DISCLAIMER: The information contained in this e-mail
is confidential. It may also be legally privileged. It is intended only for
the stated addressee(s) and access to it by any other person is
unauthorised. If you are not an addressee, you must not disclose, copy,
circulate or in any other way use or rely on the information contained in
this e-mail. Such unauthorised use may be unlawful. We may monitor all
e-mail communications through our networks. If you have received this e-mail
in error, please inform us immediately on sender's telephone number above
and delete it and all copies from your system. We accept no responsibility
for changes to any e-mail which occur after it has been sent.  Attachments
to this e-mail may contain software viruses which could damage your system.
We therefore recommend you virus-check all attachments before opening.
Thales UK Ltd. Registered Office: 2 Dashwood Lang Road, The Bourne Business
Park, Addlestone, Weybridge, Surrey KT15 2NX Registered in England No.
868273



More information about the erlang-questions mailing list