Skip to content

Commit 2c1bb62

Browse files
fix(bottle-song): allow 0 as parameter in quantifier/1 and bottle/1 typespecs (#1375)
1 parent 2d8d075 commit 2c1bb62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/bottle-song/.meta/example.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ defmodule BottleSong do
4242
defp main_line(n),
4343
do: "#{n |> quantifier() |> String.capitalize()} green #{bottle(n)} hanging on the wall,"
4444

45-
@spec quantifier(pos_integer) :: String.t()
45+
@spec quantifier(non_neg_integer) :: String.t()
4646
defp quantifier(n), do: Map.get(@quantifiers, n)
4747

48-
@spec bottle(pos_integer) :: String.t()
48+
@spec bottle(non_neg_integer) :: String.t()
4949
defp bottle(1), do: "bottle"
5050
defp bottle(_), do: "bottles"
5151
end

0 commit comments

Comments
 (0)