 
   ## split_with
 
+  defp do_split_with([h|t], fun, acc) do
+    case fun.(h) do
+      x in [false, nil] -> { List.reverse(acc), [h|t] }
+      _ -> do_split_with(t, fun, [h|acc])
+    end
+  end
+
+  defp do_split_with([], _, acc) do
+    { List.reverse(acc), [] }
+  end
+
   defp do_split_with({ h, next }, iterator, fun, acc, module) do
     case fun.(h) do
       x in [false, nil] ->

      Enum.split_with [1,2,3,4], fn x -> x == 2 end
      #=> { [1], [2, 3, 4] }
  """
  def split_with(collection, fun) do
    { iterator, pointer } = O.iterator(collection)
    module = O.__impl_for__!(collection)
    do_split_with(pointer, iterator, fun, [], module)
  end

  @doc """

      #=> [1, 2]

  """
  def take_while(collection, fun) when is_list(collection) do
    do_take_while(collection, fun)
  end

  def take_while(collection, fun) do
    case O.iterator(collection) do
      { iterator, pointer } ->
        do_take_while(pointer, iterator, fun)
      list when is_list(list) ->
        do_take_while(list, fun)
    end
  end

  @doc """
