RosettaCodeData/Task/Arithmetic-Integer/Common-Lisp/arithmetic-integer.lisp

7 lines
247 B
Common Lisp
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
(defun arithmetic (&optional (a (read *query-io*)) (b (read *query-io*)))
(mapc
(lambda (op)
(format t "~a => ~a~%" (list op a b) (funcall (symbol-function op) a b)))
'(+ - * mod rem floor ceiling truncate round expt))
(values))