[Haskell-cafe] Debunking tail recursion

Jules Bean jules at jellybean.co.uk
Fri May 18 04:52:11 EDT 2007


A conversation on #haskell just showed that it's quite hard to explain 
(at least it is for me) to people attached to tail recursion why that is 
a red herring in Haskell.

I had a poke around the wiki and couldn't see a page which explains it 
clearly. In fact 
http://www.haskell.org/haskellwiki/Performance/Accumulating_parameter is 
actuall slightly misleading since it suggests that the performance gain 
is from the tail recursion whereas really it's from the change from a 
function which accumulates an enormous thunk to an function which can do 
the work as it goes along.

If someone has the energy and the clarity to explain this clearly and 
make a wiki page about it, that would be great. If someone finds an 
existing wiki page I'm too unperceptive to notice, even better!

Jules


More information about the Haskell-Cafe mailing list