Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;;; helloworld.lisp
;;; by Paul Sweeney Jr
;;;
;; My first Hello World here!
;;
(format t "Hello, world! ~%") ; this is inline comment
;; functions
;;
(defun add (x y)
(format t "~d + ~d = ~d ~%" (values x) (values y) (+ x y))
)
(defun sub (x y)
(format t "~d - ~d = ~d ~%" (values x) (values y) (- x y))
)
(defun multiply (x y)
(format t "~d * ~d = ~d ~%" (values x) (values y) (* x y))
)
(defun divide (x y)
(format t "~d / ~d = ~d ~%" (values x) (values y) (/ x y))
)
(add 1 2)
(sub 1 4)
(multiply 3 3)
(divide 10 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment