Tail Call Optimization in Elixir & Erlang – not as efficient and important as you probably think

The prolog example is maybe be tail-recursive depending on the implementation, but you pay for it with memory. There is a hole in the list, sort of anyway as it refers to an unbound logical variable which is not free.