\doxysection{defun.\+lisp}
\hypertarget{defun_8lisp_source}{}\label{defun_8lisp_source}\index{workspace/post-\/scarcity/lisp/defun.lisp@{workspace/post-\/scarcity/lisp/defun.lisp}}
\mbox{\hyperlink{defun_8lisp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00001}00001\ (set!\ symbolp\ (lambda\ (x)\ (equal\ (type\ x)\ "{}SYMB"{})))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00002}00002\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00003}00003\ (set!\ defun!}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00004}00004\ \ \ \ \ \ \ (nlambda}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00005}00005\ \ \ \ \ \ \ \ form}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00006}00006\ \ \ \ \ \ \ \ (cond\ ((symbolp\ (car\ form))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00007}00007\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (set\ (car\ form)\ (apply\ 'lambda\ (cdr\ form))))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00008}00008\ \ \ \ \ \ \ \ \ \ (t\ nil))))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00009}00009\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00010}00010\ (set!\ defun!}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00011}00011\ \ \ \ \ \ \ (nlambda}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00012}00012\ \ \ \ \ \ \ \ form}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00013}00013\ \ \ \ \ \ \ \ (eval\ (list\ 'set!\ (car\ form)\ (cons\ 'lambda\ (cdr\ form))))))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00014}00014\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00015}00015\ (defun!\ square\ (x)\ (*\ x\ x))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00016}00016\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00017}00017\ (set!\ defsp!}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00018}00018\ \ \ \ \ \ \ (nlambda}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00019}00019\ \ \ \ \ \ \ \ form}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00020}00020\ \ \ \ \ \ \ \ (cond\ (symbolp\ (car\ form))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00021}00021\ \ \ \ \ \ \ \ \ \ (set!\ (car\ form)\ (apply\ nlambda\ (cdr\ form))))))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00022}00022\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00023}00023\ (defsp!\ cube\ (x)\ ((*\ x\ x\ x)))}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00024}00024\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00025}00025\ (set!\ p\ 5)}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00026}00026\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00027}00027\ (square\ 5)\ ;;\ should\ work}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00028}00028\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00029}00029\ (square\ p)\ ;;\ should\ work}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00030}00030\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00031}00031\ (cube\ 5)\ ;;\ should\ work}
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00032}00032\ }
\DoxyCodeLine{\Hypertarget{defun_8lisp_source_l00033}00033\ (cube\ p)\ ;;\ should\ fail:\ unbound\ symbol}

\end{DoxyCode}
