dropwhile does not work properly as defined in R12B-2:<br><br>01 dropwhile(Pred, [Hd|Tail]=Rest) -><br>02 case Pred(Hd) of<br>03 true -> dropwhile(Pred, Tail);<br>04 false -> Rest<br>05 end;<br>06 dropwhile(Pred, []) when is_function(Pred, 1) -> [].<br>
<br>it returns the entire list once it finds an element that doesn't match true.<br><br>here's what i did instead:<br><br>dropwhile(Fun, List) -><br> [Element || <br> Element <- List,<br> Fun(Element) =/= true]. <br>
<br>thanks,<br>-matt<br>