Enumerable.List.slice changed in Elixir 1.10, so this fixes:
warning: Enumerable.List.slice/3 is undefined or private. Did you mean one of:
* slice/1
* slice/4
lib/circular_buffer.ex:90: Enumerable.CircularBuffer.slice/1
Elixir's default slice implementation calls reduce and this change works
in Elixir 1.8 - 1.10. I didn't test earlier versions.
This commit also adds a test to verify that Enum.slice works at least
as well as the Elixir's implementation for lists.
Enumerable.List.slice
changed in Elixir 1.10, so this fixes:Elixir's default slice implementation calls reduce and this change works in Elixir 1.8 - 1.10. I didn't test earlier versions.
This commit also adds a test to verify that
Enum.slice
works at least as well as the Elixir's implementation for lists.