@@ -29,10 +29,10 @@ defmodule Range do
2929 iex> Enum.to_list(0..10//-1)
3030 []
3131
32- When defining a range without steps , the step will be
33- defined based on the start and stop position of the
34- range, If `start >= stop `, it will be an increasing range
35- with step of 1. Otherwise, it is a decreasing range.
32+ When defining a range without a step , the step will be
33+ defined based on the first and last position of the
34+ range, If `first >= last `, it will be an increasing range
35+ with a step of 1. Otherwise, it is a decreasing range.
3636 Note however implicitly decreasing ranges are deprecated.
3737 Therefore, if you need a decreasing range from `3` to `1`,
3838 prefer to write `3..1//-1` instead.
@@ -120,7 +120,7 @@ defmodule Range do
120120
121121 @ spec new ( limit , limit ) :: t
122122 def new ( first , last ) when is_integer ( first ) and is_integer ( last ) do
123- # TODO: Deprecate inferring a range with step of -1 on Elixir v1.17
123+ # TODO: Deprecate inferring a range with a step of -1 on Elixir v1.17
124124 step = if first <= last , do: 1 , else: - 1
125125 % Range { first: first , last: last , step: step }
126126 end
0 commit comments