hanoi no recursion (scala)