Re: Sort in a functional language
"Congratulations on not understanding the point I was making. I guess you think functional languages use a special functional based CPU rather than the normal one? Never mind."
The magic fairy dust is this: If you structure your function so that the recusive call is the last act of your function, then erlang will reuse the same stack memory, allowing you to write a recusive function to iterate over a very long list without running out of stack space.
Other languages dont tend to do this, as the programmer will have written a loop instead.