Defun


defun is a macro in the Lisp family of programming languages that defines a function in the global environment that uses the form:



Defining the function addnumbers that adds two numbers:

;; Define a function that adds two numbers together:

)

9
Defining function square that squares a number:

;; Define a function that squares a number:

)

16
Defining a function that returns the factorial of a number:


"calculates the factorial"

1
))

720