Permalink
Browse files

Update typespec of drop to allow negative integer (#8614)

Drop allows negative integers for dropping from the end.
  • Loading branch information...
clambodile authored and josevalim committed Jan 11, 2019
1 parent 0a05802 commit 35b29c1644e777cb72c4dae9ee6dbc8975dbe998
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/elixir/lib/stream.ex
@@ -330,7 +330,7 @@ defmodule Stream do
[1, 2, 3, 4, 5]
"""
@spec drop(Enumerable.t(), non_neg_integer) :: Enumerable.t()
@spec drop(Enumerable.t(), integer) :: Enumerable.t()
def drop(enum, n) when is_integer(n) and n >= 0 do
lazy(enum, n, fn f1 -> R.drop(f1) end)
end

0 comments on commit 35b29c1

Please sign in to comment.