<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:large">Thanks guys, somehow the doc gives me a feeling that lists:dropwhile will scan through all the list no matter <span class="" style="font-family:Courier,monospace;color:rgb(0,0,0);font-size:medium">Pred(Elem)</span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:medium"> returns 'true' or 'false'. =)</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:large"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:medium"><br></span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:large"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:medium">Cheers</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-21 21:36 GMT+08:00 Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 21, 2016 at 1:39 PM, fxmy wang <span dir="ltr"><<a href="mailto:fxmywc@gmail.com" target="_blank">fxmywc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is this behavior expected?</blockquote></div><br>yes. To make it explicit:</div><div class="gmail_extra"><br></div><div class="gmail_extra">In lists:dropwhile(fun(E) -> E > 3 end, [1,2,3,4,5]), we first check if 1 > 3. This is false, so we stop dropping and return the remainder of the list, which is [1,2,3,4,5].<span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>J.</div>
</font></span></div></div>
</blockquote></div><br></div>