<div dir="ltr">On 1 September 2013 22:01, Dmitry Olshansky <span dir="ltr"><<a href="mailto:dmitry.olsh@gmail.com" target="_blank">dmitry.olsh@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">01-Sep-2013 06:57, Andrej Mitrovic пишет:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 9/1/13, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br></div><div class="im">
auto idx = array.countUntil(item);<br>
if (idx != -1)<br>
     array = array.remove(idx);<br>
</div></blockquote>
<br>
We just need better documentation/examples..<br>
E.g. this works fine:<br>
<br>
    int[] arr = [1, 2, 3, 1, 4 ];<br>
    arr = remove!(x => x == 1)(arr);<br>
    assert(arr == [2, 3, 4]);<br>
<br>
And one can even ask it to do unstable removal which is faster.</blockquote><div><br></div><div>I'd agree that's fairly acceptable. It's just not obvious/intuitive.</div><div>My bad, I should be more familiar with phobos than I am...</div>
</div></div></div>