[erlang-questions] removing an element from a list

Ivan Uemlianin ivan@REDACTED
Tue May 3 11:04:39 CEST 2011


Dear All

It seems there are two ways to remove an element from a list:

    1> A = [q,w,e,r,t,y].
    [q,w,e,r,t,y]
    2> A -- [q].
    [w,e,r,t,y]
    3> lists:delete(q, A).
    [w,e,r,t,y]
    4>


Which is better, and why, or is TMTOWTDI?  (I'm sure the answer won't be 
as simple as the question:).

With thanks and best wishes

Ivan

-- 
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

                     ivan@REDACTED
                      www.llaisdy.com
                          llaisdy.wordpress.com
                      www.linkedin.com/in/ivanuemlianin

     "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
                      (Schiller, Beethoven)
============================================================




More information about the erlang-questions mailing list