Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/elixir/lib/enum.ex
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,10 @@ defmodule Enum do
end
end

def count_until(_enumerable, _limit) do
raise ArgumentError, "Enum.count_until/2 only accepts limits greater than 0"
Comment thread
davydog187 marked this conversation as resolved.
Outdated
end

@doc """
Counts the elements in the enumerable for which `fun` returns a truthy value, stopping at `limit`.

Expand All @@ -801,6 +805,10 @@ defmodule Enum do
end
end

def count_until(_enumerable, _fun, _limit) do
raise ArgumentError, "Enum.count_until/3 only accepts limits greater than 0"
end

@doc """
Enumerates the `enumerable`, returning a list where all consecutive
duplicate elements are collapsed to a single element.
Expand Down