[Haskell-cafe] Josephus problem and style
Anthony Chaumas-Pellet
achaumas at wispery.info
Tue Apr 3 05:35:36 EDT 2007
Thanks for your comments everyone! There is one point that has left me
puzzled, though.
From: Ross Paterson <ross at soi.city.ac.uk>
> You show a bias towards tail recursion. It would be neater (and lazier)
> to return the executed ones incrementally. This is easier if you don't
> distinguish the survivor from the rest, i.e. just put it on the end of
> the list.
Why is tail recursion a bad thing for a finite function? (Of course,
it would be... curious on functions that can produce infinite results)
Is tail recursion simply not the most common Haskell idiom, or is
there some technical reason I fail to see?
Anthony Chaumas-Pellet
More information about the Haskell-Cafe
mailing list