(defun add (x y) (cond ((= y 0) x) (t (1+ (add x (1- y)))))) (defun multiply (x y) (cond ((= y 0) 0) (t (add x (multiply x (1- y)))))) (defun power (x y) (cond ((= y 0) 1) (t (multiply x (power x (1- y)))))) (defun hyper-power (x y) (cond ((= y 0) 1) (t (power x (hyper-power x (1- y)))))) (defun hyper-power1 (x y) (cond ((= y 0) 1) (t (pow x (hyper-power x (1- y)))))) (defun test-addition-etc (x y) (interactive "nx: ny: ") (setq o '()) (let ((result '()) (y1 y)) (while (>= x 0) (while (>= y 0) (if (= (multiply x y) (* x y)) (setq result (append result '(YES))) (setq result (append result '(NO))) ) (if (= (power x y) (pow x y)) (setq result (append result '(YES))) (setq result (append result '(NO))) ) (setq o (append o (list x y))) (setq y (1- y)) ) (setq y y1) (setq x (1- x)) ) result ) )