Note:

a list of arguments is always a proper list. You don't need to test if it is well formed.

Hereafter is the code of the when primitive.
\begin{Code}
\begin{listing}[200]{2}
static PRIMITIVE when(SCM l, SCM env, int a...
... {
res = STk_eval(CAR(l), env);
}
}
}
return res;
}
\end{listing}\end{Code}

Some points to note here:

Figure [*] shows a complete implementation of when and unless.

Figure: Source listing of file when_unless.c
\begin{figure}\begin{quote}\footnotesize
\begin{verbatim}...