 
   """
   @spec find_value(t, any, (element -> any)) :: any | :nil
-  def find_value(collection, ifnone \\ nil, fun)
-
-  def find_value(collection, ifnone, fun) when is_list(collection) do
-    do_find_value(collection, ifnone, fun)
-  end
-
-  def find_value(collection, ifnone, fun) do
-    Enumerable.reduce(collection, {:cont, ifnone}, fn(entry, ifnone) ->
+  def find_value(collection, default \\ nil, fun)
+
+  def find_value(collection, default, fun) when is_list(collection) do
+    do_find_value(collection, default, fun)
+  end
+
+  def find_value(collection, default, fun) do
+    Enumerable.reduce(collection, {:cont, default}, fn(entry, default) ->
       fun_entry = fun.(entry)
-      if fun_entry, do: {:halt, fun_entry}, else: {:cont, ifnone}
+      if fun_entry, do: {:halt, fun_entry}, else: {:cont, default}
     end) |> elem(1)
   end
 


  ## find_value

  defp do_find_value([h|t], ifnone, fun) do
    fun.(h) || do_find_value(t, ifnone, fun)
  end

  defp do_find_value([], ifnone, _) do
    ifnone
  end

  ## shuffle


  """
  @spec find(t, default, (element -> any)) :: element | default
  def find(collection, default \\ nil, fun)

  def find(collection, default, fun) when is_list(collection) do
    do_find(collection, default, fun)
  end

  def find(collection, default, fun) do
    Enumerable.reduce(collection, {:cont, default}, fn(entry, default) ->
      if fun.(entry), do: {:halt, entry}, else: {:cont, default}
    end) |> elem(1)
  end

