Stream.drop_every

You're seeing just the function drop_every, go back to Stream module for more information.

Specs

drop_every(Enumerable.t(), non_neg_integer()) :: Enumerable.t()

Creates a stream that drops every nth element from the enumerable.

The first element is always dropped, unless nth is 0.

nth must be a non-negative integer.

Examples

iex> stream = Stream.drop_every(1..10, 2)
iex> Enum.to_list(stream)
[2, 4, 6, 8, 10]

iex> stream = Stream.drop_every(1..1000, 1)
iex> Enum.to_list(stream)
[]

iex> stream = Stream.drop_every([1, 2, 3, 4, 5], 0)
iex> Enum.to_list(stream)
[1, 2, 3, 4, 5]