<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      The most typical use case, for me, is when using either
      filename:split or string :tokens to create a list of elements
      where the last element is not needed.  I.e. this is in some sense
      a generalization of filename:dirname/1 (which I bet has something
      like this in its implementation...)<br>
      I have also seen this exact use is in lib/ssh/src/ssh_sftpd.erl in
      otp ;-)<br>
      <br>
      Also, when handling a failing test case, which consists of a list
      of commands, it is useful to treat the successful commands
      (init(Commands)) differently from the failing command
      (last(Commands)).<br>
      <br>
      I have personally never missed the 'remove N last
      elements'-function.<br>
      <br>
      Cheers,<br>
      <br>
      Hans<br>
      <br>
      <br>
      On 2013-04-30 12:05, Siri Hansen wrote:<br>
    </div>
    <blockquote
cite="mid:CAGqERUE4AD0y97G+yrJ4n2iKrJHpkPvsp3vpHQBVZu3M5UdMrw@mail.gmail.com"
      type="cite">
      <div dir="ltr">We haven't yet made any decision regarding this
        patch, but we have had some discussions in the team and we are
        not totally convinced about the general need for this function.
        Thus we would appreciate some input from the list. 
        <div>
          <br>
        </div>
        <div>So - disregarding the name and the implementation for a
          second - is this functionality a good addition to the lists
          module? Is it often needed?
          <div><br>
          </div>
          <div style="">If so, would it be even better to do a more
            general version which removes the N last elements from the
            list?</div>
        </div>
        <div style=""><br>
        </div>
        <div style="">Hans, could you also possibly describe some of
          your use cases?</div>
        <div style=""><br>
        </div>
        <div style="">Regards</div>
        <div style="">siri@otp</div>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">
            2013/4/29 Fredrik <span dir="ltr"><<a
                moz-do-not-send="true" href="mailto:fredrik@erlang.org"
                target="_blank">fredrik@erlang.org</a>></span><br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div class="im">On 04/25/2013 05:12 PM, Hans Svensson
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  git fetch git://<a moz-do-not-send="true"
                    href="http://github.com/hanssv/otp.git"
                    target="_blank">github.com/hanssv/otp.git</a>
                  add_init_to_lists <br>
                </blockquote>
              </div>
              Fetched, it is currently located in the 'pu' branch.<br>
              A review process has started.<br>
              Thanks,<span class="HOEnZb"><font color="#888888"><br>
                  <br>
                  -- <br>
                  <br>
                  BR Fredrik Gustafsson<br>
                  Erlang OTP Team</font></span>
              <div class="HOEnZb">
                <div class="h5"><br>
                  <br>
                  _______________________________________________<br>
                  erlang-patches mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:erlang-patches@erlang.org"
                    target="_blank">erlang-patches@erlang.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://erlang.org/mailman/listinfo/erlang-patches"
                    target="_blank">http://erlang.org/mailman/listinfo/erlang-patches</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>