lists:foldl(fun(X,Y) when X rem 2=:= 0 ->[X|Y]; (_,Y) -> Y end, [], [1,2,3,4,5,6]).
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more