\documentstyle[12pt,twoside,mythesis]{report}
\pagestyle{headings}

\makeatletter
\def\citationpages{\@gobble}

\begin{document}
\label{root}
\input{genmacs}

\makeatletter

\def\@mapcar#1#2#3{\@@mapcar#1{#2}#3,\@nil}

\def\@@mapcar#1#2#3,#4\@nil{\@mapapp{#1}{#3}\@mapcont{#2}{#4}}

\def\@mapapp#1#2{\edef\@mapitem{#2}\ifx\@mapitem\empty\else #1#2}
\def\@mapcont#1#2{\edef\@mapnext{#2}\ifx\@mapnext\empty\else #1\expandafter\@@mapcar #2,}

\def\stub#1{item#1meti}

\@mapcar\stub*{1,2,3,4}\par
\@mapcar\stub*{}\par
\@mapcar\stub*{1}\par

\def\@pageprint#1{{\def\c@page{#1}\thepage}}

\makeatother

\end{document}
