       #=> [[1,2],[1,2]]
 
   """
-  def duplicate(elem, n) do
+  def duplicate(elem, n) when is_integer(n) do
     Erlang.lists.duplicate(n, elem)
   end
 
   ## Private
-
-  # flatten
-
-  defp do_flatten([h|t], tail) when is_list(h) do
-    do_flatten(h, do_flatten(t, tail))
-  end
-
-  defp do_flatten([h|t], tail) do
-    [h|do_flatten(t, tail)]
-  end
-
-  defp do_flatten([], tail) do
-    tail
-  end
-
-  # seq
-
-  defp do_seq(n, x, l) when n >= 4 do
-    do_seq(n-4, x-4, [x-3,x-2,x-1,x|l])
-  end
-
-  defp do_seq(n, x, l) when n >= 2 do
-    do_seq(n-2, x-2, [x-1,x|l])
-  end
-
-  defp do_seq(1, x, l) do
-    [x|l]
-  end
-
-  defp do_seq(0, _, l) do
-    l
-  end
 
   # uniq
 

      #=> -2

  """
  def foldr(list, acc, function) do
    Erlang.lists.foldr(function, acc, list)
  end


      #=> 2

  """
  def foldl(list, acc, function) when is_list(list) and is_function(function) do
    Erlang.lists.foldl(function, acc, list)
  end

