[Haskell-beginners] tower hanoi problem

YCH dontdieych at gmail.com
Sat Feb 14 21:53:11 UTC 2015


> You can put the first disk on the second or the thirth peg.

Think a, b, c as 'src, target, temp'

So if you have only one disk on src peg, it has to go target peg. But if
you have two or more discs, you cannot put first peg on target peg.

hanoi 1 1 2 3 = [ (1, 2) ]
hanoi 2 1 2 3 = [ ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150215/c67c13d9/attachment.html>


More information about the Beginners mailing list