\begin{patch}{StreamXmpPagePatch1}
\begin{paste}{StreamXmpPageFull1}{StreamXmpPageEmpty1}
\pastebutton{StreamXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{ints := [i for i in 0..]\bound{ints }}
\indentrel{3}\begin{verbatim}
   (1)  [0,1,2,3,4,5,6,7,8,9,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty1}
\begin{paste}{StreamXmpPageEmpty1}{StreamXmpPagePatch1}
\pastebutton{StreamXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{ints := [i for i in 0..]\bound{ints }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch2}
\begin{paste}{StreamXmpPageFull2}{StreamXmpPageEmpty2}
\pastebutton{StreamXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{f : List INT -> List INT\bound{fdec }}
\indentrel{3}\begin{verbatim}
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty2}
\begin{paste}{StreamXmpPageEmpty2}{StreamXmpPagePatch2}
\pastebutton{StreamXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{f : List INT -> List INT\bound{fdec }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch3}
\begin{paste}{StreamXmpPageFull3}{StreamXmpPageEmpty3}
\pastebutton{StreamXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{f x == [x.1 + x.2, x.1]\bound{f }\free{fdec }}
\indentrel{3}\begin{verbatim}
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty3}
\begin{paste}{StreamXmpPageEmpty3}{StreamXmpPagePatch3}
\pastebutton{StreamXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{f x == [x.1 + x.2, x.1]\bound{f }\free{fdec }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch4}
\begin{paste}{StreamXmpPageFull4}{StreamXmpPageEmpty4}
\pastebutton{StreamXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{fibs := [i.2 for i in [generate(f,[1,1])]]\bound{fibs }\free{f }}
\indentrel{3}\begin{verbatim}
   (4)  [1,1,2,3,5,8,13,21,34,55,...]
                                   Type: Stream Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty4}
\begin{paste}{StreamXmpPageEmpty4}{StreamXmpPagePatch4}
\pastebutton{StreamXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{fibs := [i.2 for i in [generate(f,[1,1])]]\bound{fibs }\free{f }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch5}
\begin{paste}{StreamXmpPageFull5}{StreamXmpPageEmpty5}
\pastebutton{StreamXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{[i for i in ints | odd? i]\free{ints }}
\indentrel{3}\begin{verbatim}
   (5)  [1,3,5,7,9,11,13,15,17,19,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty5}
\begin{paste}{StreamXmpPageEmpty5}{StreamXmpPagePatch5}
\pastebutton{StreamXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{[i for i in ints | odd? i]\free{ints }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch6}
\begin{paste}{StreamXmpPageFull6}{StreamXmpPageEmpty6}
\pastebutton{StreamXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{odds := [2*i+1 for i in ints]\bound{odds }\free{ints }}
\indentrel{3}\begin{verbatim}
   (6)  [1,3,5,7,9,11,13,15,17,19,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty6}
\begin{paste}{StreamXmpPageEmpty6}{StreamXmpPagePatch6}
\pastebutton{StreamXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{odds := [2*i+1 for i in ints]\bound{odds }\free{ints }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch7}
\begin{paste}{StreamXmpPageFull7}{StreamXmpPageEmpty7}
\pastebutton{StreamXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{scan(0,+,odds)\free{odds }}
\indentrel{3}\begin{verbatim}
   (7)  [1,4,9,16,25,36,49,64,81,100,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty7}
\begin{paste}{StreamXmpPageEmpty7}{StreamXmpPagePatch7}
\pastebutton{StreamXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{scan(0,+,odds)\free{odds }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch8}
\begin{paste}{StreamXmpPageFull8}{StreamXmpPageEmpty8}
\pastebutton{StreamXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{[i*j for i in ints for j in odds]\free{ints }\free{odds }}
\indentrel{3}\begin{verbatim}
   (8)  [0,3,10,21,36,55,78,105,136,171,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty8}
\begin{paste}{StreamXmpPageEmpty8}{StreamXmpPagePatch8}
\pastebutton{StreamXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{[i*j for i in ints for j in odds]\free{ints }\free{odds }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch9}
\begin{paste}{StreamXmpPageFull9}{StreamXmpPageEmpty9}
\pastebutton{StreamXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{map(*,ints,odds)\free{ints odds }}
\indentrel{3}\begin{verbatim}
   (9)  [0,3,10,21,36,55,78,105,136,171,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty9}
\begin{paste}{StreamXmpPageEmpty9}{StreamXmpPagePatch9}
\pastebutton{StreamXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{map(*,ints,odds)\free{ints odds }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch10}
\begin{paste}{StreamXmpPageFull10}{StreamXmpPageEmpty10}
\pastebutton{StreamXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{first ints\free{ints }}
\indentrel{3}\begin{verbatim}
   (10)  0
                               Type: NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty10}
\begin{paste}{StreamXmpPageEmpty10}{StreamXmpPagePatch10}
\pastebutton{StreamXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{first ints\free{ints }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch11}
\begin{paste}{StreamXmpPageFull11}{StreamXmpPageEmpty11}
\pastebutton{StreamXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{rest ints\free{ints }}
\indentrel{3}\begin{verbatim}
   (11)  [1,2,3,4,5,6,7,8,9,10,...]
                        Type: Stream NonNegativeInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty11}
\begin{paste}{StreamXmpPageEmpty11}{StreamXmpPagePatch11}
\pastebutton{StreamXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{rest ints\free{ints }}
\end{paste}\end{patch}

\begin{patch}{StreamXmpPagePatch12}
\begin{paste}{StreamXmpPageFull12}{StreamXmpPageEmpty12}
\pastebutton{StreamXmpPageFull12}{\hidepaste}
\tab{5}\spadcommand{fibs 20\free{fibs }}
\indentrel{3}\begin{verbatim}
   (12)  6765
                                  Type: PositiveInteger
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StreamXmpPageEmpty12}
\begin{paste}{StreamXmpPageEmpty12}{StreamXmpPagePatch12}
\pastebutton{StreamXmpPageEmpty12}{\showpaste}
\tab{5}\spadcommand{fibs 20\free{fibs }}
\end{paste}\end{patch}