[erlang-questions] lists:takewhile and lists:splitwith

Masklinn <>
Thu Feb 3 11:50:50 CET 2011


On 2011-02-03, at 11:06 , Joseph Wayne Norton wrote:
> Try the following ...
> 
> 5> lists:partition(fun(A)-> A<3 end,[1,2,3,4,5]).
> {[1,2],[3,4,5]}
> 
But remember that lists:partition's semantics are based on those of lists:filter, not lists:takewhile and lists:dropwhile



More information about the erlang-questions mailing list