\documentclass[a4paper]{article}

\title{Lua\LaTeX\ and combinations}
\author{Richard}

\usepackage{luacode}
\newcounter{f}
\newcounter{c}
\newcounter{n}
\parskip4pt
\parindent0pt

\begin{document}

\maketitle

Here are some possible types of fruit.
\begin{enumerate}
\item banana
\item strawberry
\item kumquat
  \setcounter{f}{\value{enumi}}
\end{enumerate}

Here are some colours.
\begin{enumerate}
\item green
\item purple
\item cadmium red
\item skyblue pink
  \setcounter{c}{\value{enumi}}
\end{enumerate}

Here are some numbers.
\begin{enumerate}
\item $1$
\item $2$
\item $3$
\item $4$
\item $79$
\item $82\frac12$ 
\item $\aleph_0$
  \setcounter{n}{\value{enumi}}
\end{enumerate}

Suppose we are asked to pick one kind of fruit, one colour and one number
from the above lists, for example $79$ purple kumquats;
in how many different ways can we do this?

Obviously the answer is that we multiply the number of kinds of fruit (\arabic{f}) 
with the number of colours (\arabic{c}) and the number of numbers (\arabic{n}).

\begin{quote}
  The answer is:
  \begin{luacode}
    n = \arabic{f} * \arabic{c} * \arabic{n}
    tex.sprint( n )
  \end{luacode}
\end{quote}

Now go and add or remove some of the fruits colours or numbers and re-process this 
file using Lua\LaTeX.

\end{document}
