Move zeroes to the end of array
This is a problem that's well suited to elementwise aggregation. Consider the following:

move_zeroes (L) -&gt;
    case L of
       [0 | T] -&gt; move_zeroes(T) ++ [0];
       [El | T] -&gt; [El] ++ move_zeroes(T);
       _Else -&gt; L
    end.


I am only blindly guessing at the syntax here, but this should clarify how one would write this without using lists:filter twice. It additionally avoids the helper function you created there, which seems to not serve a purpose ...