Skip to content

Instantly share code, notes, and snippets.

@sweeneyapps
Created July 6, 2021 21:25
Show Gist options
  • Save sweeneyapps/45caf1ff0feda7afdf170d08436591da to your computer and use it in GitHub Desktop.
Save sweeneyapps/45caf1ff0feda7afdf170d08436591da to your computer and use it in GitHub Desktop.
;;; 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