254628 (1) [Avatar] Offline
My solution of range/2 was sometimes giving strings not integers in IEx, which was a bit confusing. I loaded the reference solution and it did the same.

iex(3)> RecursionPracticeTc.range(10,13)

iex(5)> RecursionPracticeTc.range(11,15)
[11, 12, 13, 14, 15]

Simplifying everything I tried

iex(8)> [10]
iex(9)> [15]

I reread the strings section in 2.4.8 and the answer was there...
even the runtime doesn't distinguish between a list of integers and a character list. When a list consists of integers that represent printable characters, it's printed to the screen in string form.

sjuric (86) [Avatar] Offline
Yes, this is a common pitfall for people arriving to Erlang smilie

For the next edition, I'll consider including a reminder about that issue in the recursion section.