Task

Solve the   Towers of Hanoi   problem with recursion.




main => 
    hanoi(3, left, center, right).
 
hanoi(0, _From, _To, _Via) => true.
hanoi(N, From, To, Via) =>
    hanoi(N - 1, From, Via, To),
    printf("Move disk %w from pole %w to pole %w\n", N, From, To),
    hanoi(N - 1, Via, To, From).
 