I'm trying to create a partition-by function in Erlang where the first argument is a predicate function.

```
step(_, [ ]) ->
  [ ];

step(N, C) ->
  [_ | T] = C,
  case (N > 0) and (length(C) > 0) of
    true ->
      step(N - 1, T);
    false ->
      C
  end.

drop(_, [ ]) ->
  [ ];

drop(Number, Collection) ->
  step(Number, Collection).

partition_by(_, [ ]) ->
  [ ];

partition_by(F, Collection) ->
  [H | T] = [Collection],
  Head_value = F(H),
  Run = [H | lists:takewhile(fun(E) -> Head_value =:= F(E) end, T)],
  [Run | partition_by(F, erl_funcs:drop(length(Run), Collection))].

```

But when calling it:

```
partition_by(fun(E) -> E > 0 end, [-44444, -4555555, 455555]).

```

I'm getting:

```
[[[-44444,-4555555,455555]],[[-4555555,455555]],[[455555]]]

```

Not exactly what I'm thinking of. Any ideas what is going wrong?