rosetta/towers_of_hanoi.bruijn

Problem description

:import std/Combinator .
:import std/Number .
:import std/String .

hanoi y [[[[=?2 empty go]]]]
	go [(4 --3 2 0) ++ str ++ (4 --3 0 1)] ((+6) - 1 - 0)
		str "Move " ++ disk ++ " from " ++ source ++ " to " ++ destination ++ "\n"
			disk number→string 3
			source number→string 2
			destination number→string 1