Skip to content

Instantly share code, notes, and snippets.

@sweeneyapps
Created July 6, 2021 21:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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