Function: hanoi

hanoi is an autoloaded, interactive and byte-compiled function defined in hanoi.el.gz.

Signature

(hanoi NRINGS)

Documentation

Towers of Hanoi diversion. Use NRINGS rings.

Probably introduced at or before Emacs version 17.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/hanoi.el.gz
;;;
;;; hanoi - user callable Towers of Hanoi
;;;
;;;###autoload
(defun hanoi (nrings)
  "Towers of Hanoi diversion.  Use NRINGS rings."
  (interactive
   (list (if (null current-prefix-arg)
	     3
	     (prefix-numeric-value current-prefix-arg))))
  (if (< nrings 0)
      (error "Negative number of rings"))
  (hanoi-internal nrings (make-list nrings 0) (float-time)))