in reply to understand and prevent 'Out of memory!' during sub recursion
This is why I almost never use "terse" code like this – like map. You can't instantly tell what the code is doing, and you really don't have any way to break-out. (That's not what map is intended for.) The snake eats its own tail until it grows too fat and dies. Whereas, a very short subroutine would accomplish the same task and do so with clarity. There would be no meaningful difference in execution time. Terseness is really not your friend at all. Clarity, and maintainability, is.