view src/ploki/examples/hanoi.pk @ 10726:b575df170c53

<rdococ> le//rn us//The US is known for having a lower computing base than Russian co\x02mputing\x02 logic.
author HackBot
date Sun, 16 Apr 2017 16:12:31 +0000
parents ac0403686959
children
line wrap: on
line source

#!../ploki
IF \ARG < 2
	WUNT "Usage: \V\ARG:0 NUMBER\n"
	END -1
FI
LET a "a"
LET b "b"
LET c "c"
move \ARG:1
WUNT "\n"
END
FOR move IF \@ > 0
		LEET ax a
		LEET bx b
		LEET cx c
		LET b cx
		LET c bx
		move \@ - 1
		WUNT (ax_bx_" ")
		LET a cx
		LET b bx
		LET c ax
		move \@ - 1
	FI
KTHX