I was running through some Elixir Koans and came across the following:
think "taking some items the other way" do
numbers = 1..10
assert Enum.take(numbers, -2) == __?
end
After spending a lot of time on this I finally looked at it in iex and I get:
'\t\n'
After more experimentation:
Enum.take(numbers, -4) == '\a\b\t\n'
Enum.take(numbers, -5) == [6, 7, 8, 9, 10]
Why does this print out ascii sometimes and the list I'm expecting other times? What happens at 7?