       #=> [1, 2]
 
   """
-  def take_while(collection, fun // fn(x) -> x end) do
-    { iterator, pointer } = O.iterator(collection)
-    do_take_while(pointer, iterator, fun)
+  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 """

  Provides a set of algorithms that enumerate over collections according to the
  `Enum.Iterator` protocol. Most of the functions in this module have two
  flavours. If a given collection implements the mentioned protocol (like
  list, for instance), you can do

      Enum.map [1,2,3], fn(x) -> x * 2 end


    binary_to_list map_join(collection, list_to_binary(joiner), mapper)
  end

  def map_join(collection, joiner, mapper) when is_list(collection) do
    do_map_join(collection, mapper, joiner, nil)
  end

  def map_join(collection, joiner, mapper) when is_binary(joiner) do
    case I.iterator(collection) do
      { iterator, pointer } ->
        do_map_join(pointer, iterator, mapper, joiner, nil)
      list when is_list(list) ->
        map_join(list, joiner, mapper)
    end
  end

  @doc """
