Skip to content

Instantly share code, notes, and snippets.

@Yord
Created May 1, 2012 12:31
Show Gist options
  • Save Yord/2567687 to your computer and use it in GitHub Desktop.
Save Yord/2567687 to your computer and use it in GitHub Desktop.
\documentclass{article}
\input{list}
\def\times#1#2{\newcount\int\int\numexpr#1*#2\relax\the\int}
\begin{document}
\List[new]{numbers}{1,2,3,4,5,6,7,8,9}
list: \numbers[items]
head: \numbers[head]
tail: \numbers[tail]
\List[new]{doubles}{\numbers[map]{\times{2}}}
doubles: \doubles[items]
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment