Created
July 6, 2021 21:25
-
-
Save sweeneyapps/45caf1ff0feda7afdf170d08436591da 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
;;; 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