Created
October 13, 2009 08:28
-
-
Save axelson/209102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun max-min () | |
(loop with num do (setf num (read)) until (eql num 'q) | |
initially (format t "Please enter numbers (q to quit): ") | |
maximizing num into max | |
minimizing num into min | |
finally (format t "Max: ~a~%Min: ~a" max min))) | |
(defun pos-power (base exponent) | |
(if (<= exponent 1) base | |
(* base (pos-power base (decf exponent))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment