Closed Qqwy closed 2 years ago
Given
generator = StreamData.integer(2..8//2)
When calling
generator |> Enum.take(1_000) |> MapSet.new
the expected output is
#MapSet<[2, 4, 6, 8]>
(i.e. the same as calling MapSet.new(2..8//2))
MapSet.new(2..8//2)
but instead we get
#MapSet<[2, 3, 4, 5, 6, 7, 8]>
It seems StreamData is not taking the step field (introduced in Elixir 1.12) into account.
step
I'd be willing to contribute a PR to fix this, by the way :slightly_smiling_face:
@Qqwy yep, definitely not taking steps into account yet. Please do send a PR! 💟
Given
When calling
the expected output is
(i.e. the same as calling
MapSet.new(2..8//2)
)but instead we get
It seems StreamData is not taking the
step
field (introduced in Elixir 1.12) into account.