10.1. Example: The Towers of Hanoi

In this example, which is intended to give a taste of the capabilities of
references, we will solve the well-known Towers of Hanoi problem. (Refer to the link to learn
more about the problem.) The number of disks can be input from the command-line.
The towers themselves will be represented as an array of three elements, each
of which is a reference to an array.

We will use the recursive solution in which in order to move a column of $N
disks, we first move the upper column with $N-1 disks and then move the
bottom most disk, and then move the $N-1 disks-long column on top of it.