Re: [Haskell-beginners] tower hanoi problem

On 2/19/15 4:47 AM, Joel Neely wrote:
Incidentally, I also find it interesting to see the subtle effects that our terminology has on the way we approach problems. Thinking of a list as "it may be empty or not" takes my thoughts in a different direction than if I think "it may have a head or not".
A telling aphorism. It will stick with me for a long time. Regarding the problem that sparked this discussion, Hanoi: if you think first about the base case, it's likely to be this: to transfer a oone-disc pile from A to B using C as an intermediate, move A to B. If you think first about the recursive step, you'll likely come up with a different base case: to transfer zero discs, do nothing. With this insight, you've generalized your original understanding of the problem. Doug
participants (1)
-
Doug McIlroy