\doxysection{workspace/post-\/scarcity/src/ops/loop.c File Reference}
\hypertarget{loop_8c}{}\label{loop_8c}\index{workspace/post-\/scarcity/src/ops/loop.c@{workspace/post-\/scarcity/src/ops/loop.c}}
{\ttfamily \#include "{}consspaceobject.\+h"{}}\newline
{\ttfamily \#include "{}lispops.\+h"{}}\newline
{\ttfamily \#include "{}loop.\+h"{}}\newline
Include dependency graph for loop.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{loop_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{loop_8c_a3d25163fa4f49298b23e78557f915268}{lisp\+\_\+loop}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Special form, not dissimilar to {\ttfamily let}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\Hypertarget{loop_8c_a3d25163fa4f49298b23e78557f915268}\label{loop_8c_a3d25163fa4f49298b23e78557f915268} 
\index{loop.c@{loop.c}!lisp\_loop@{lisp\_loop}}
\index{lisp\_loop@{lisp\_loop}!loop.c@{loop.c}}
\doxysubsubsection{\texorpdfstring{lisp\_loop()}{lisp\_loop()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+loop (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Special form, not dissimilar to {\ttfamily let}. 

Essentially,


\begin{DoxyEnumerate}
\item the first arg ({\ttfamily args}) is an assoc list;
\item the second arg ({\ttfamily body}) is an expression.
\end{DoxyEnumerate}

Each of the vals in the assoc list is evaluated, and bound to its respective key in a new environment. The body is then evaled in that environment. If the result is an object of type LOOP, it should carry a list of values of the same arity as args. Each of the keys in args is then rebound in a new environment to the respective value from the LOOP object, and body is then re-\/evaled in that environment.

If the result is not a LOOP object, it is simply returned. 

Definition at line \mbox{\hyperlink{loop_8c_source_l00045}{45}} of file \mbox{\hyperlink{loop_8c_source}{loop.\+c}}.



References \mbox{\hyperlink{lispops_8c_source_l00840}{c\+\_\+keys()}}.

