[Haskell-beginners] tower hanoi problem

Mike Meyer mwm at mired.org
Tue Feb 17 16:47:55 UTC 2015


On Feb 17, 2015 10:18 AM, "Roelof Wobben" <r.wobben at home.nl> wrote:
>
> This part I understand well.
>
> So you could do something like this:
>
> hanoi n 1 2 3
>    | n = 0 -> moves the last disk to the goal peg
>    | n != 0 -> moves all the other disk to the spare peg or to the  moves
n -1 to the goal peg

What does n represent here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150217/b4d916a4/attachment.html>


More information about the Beginners mailing list