hanoi.l

来自「A very small LISP implementation with se」· L 代码 · 共 25 行

L
25
字号
# 10nov04abu# (c) Software Lab. Alexander Burger# Lisp(de hanoi (N)   (move N 'left 'center 'right) )(de move (N A B C)   (unless (=0 N)      (move (dec N) A C B)      (println 'Move 'disk 'from 'the A 'to 'the B 'pole)      (move (dec N) C B A) ) )# Pilog(be hanoi (@N)   (move @N left center right) )(be move (0 @ @ @) T)(be move (@N @A @B @C)   (@M - (-> @N) 1)   (move @M @A @C @B)   (@ println 'Move 'disk 'from 'the (-> @A) 'to 'the (-> @B) 'pole)   (move @M @C @B @A) )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?