Skip to content

Commit

Permalink
fix: correct Enum.join/2 spec (#13094)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth authored Nov 10, 2023
1 parent 665a459 commit 9eb86db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/elixir/lib/enum.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1636,8 +1636,8 @@ defmodule Enum do
If `joiner` is not passed at all, it defaults to an empty string.
All elements in the `enumerable` must be convertible to a string,
otherwise an error is raised.
All elements in the `enumerable` must be convertible to a string
or be a binary, otherwise an error is raised.
## Examples
Expand All @@ -1651,7 +1651,7 @@ defmodule Enum do
"ab cdefg h i"
"""
@spec join(t, String.t()) :: String.t()
@spec join(t, binary()) :: binary()
def join(enumerable, joiner \\ "")

def join(enumerable, "") do
Expand Down

0 comments on commit 9eb86db

Please sign in to comment.