See en.wikipedia.org/wiki/Tower_of_Hanoi for a detailed intro, if you're not familiar with this classic recurrence problem.
Set the towers as variables, ahead of calling the function, in the global context:
msg ctx.set (state :JSON)
Now call the recursion:
This simplistic example would not work, because the parameters are immutable. To be able to mutate the contents of the incoming arguments, you'll need a global scope like we used in the "good" example above, with