<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
  "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"
  [<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
   <!ENTITY CLin "<mo class='builtin' lspace='thickmathspace' rspace='thickmathspace'>&epsiv;</mo>">]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Clausal Language (ver. 5.81.19, by P.J. Voda, J. Komara, J. Kluka)</title
>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="formdata2querystring.js"></script>
<script type="text/javascript" src="submit-update.js"></script>
<link rel="stylesheet" type="text/css" href="default.css" title="Default"/>
<link rel="alternate stylesheet" type="text/css" href="embers.css" title="Embers"
/>
</head>
<body>
<div id="_updater_" name="_edit_updater_">...
</div>
<div id="_main_editor_">
<form action="#" method="POST" class="quit_box"><input type="hidden" name="action"
 value="quit"/><input type="hidden" name="selector" value="id------"/><button
 type="submit" name="name" value="File" accesskey="f" title="Alt+Shift+F" class="quit"
 onclick="return submitForm(this.form,this);"><span class="acskey">F</span>ile</button
><button type="submit" name="name" value="Save" accesskey="s" title="Alt+Shift+S"
 class="quit" onclick="return submitForm(this.form,this);"><span class="acskey"
>S</span>ave</button><button type="submit" name="name" value="Setup" accesskey="u"
 title="Alt+Shift+U" class="quit" onclick="return submitForm(this.form,this);"
>Set<span class="acskey">u</span>p</button><button type="submit" name="name"
 value="Recompile" accesskey="r" title="Alt+Shift+R" class="quit" onclick="return submitForm(this.form,this);"
><span class="acskey">R</span>ecompile</button><button type="submit" name="name"
 value="Reexec. Query" accesskey="q" title="Alt+Shift+Q" class="quit" onclick="return submitForm(this.form,this);"
>Reexec. <span class="acskey">Q</span>uery</button><button type="submit" name="name"
 value="Save &amp; Exit" accesskey="x" title="Alt+Shift+X" class="quit" onclick="return submitForm(this.form,this);"
>Save &amp; E<span class="acskey">x</span>it</button><input type="hidden" name="xoff"
 value="0"/><input type="hidden" name="yoff" value="0"/>
</form>
<div class="framed1">
<div class="framename">Clausal Language (ver. 5.81.19, by P.J. Voda, J. Komara, J. Kluka)
</div>
<div id="idD-----">
<div id="idE-----" class="editable">
<div id="idF-----"/>
</div>
<div id="idG-----" class="editable">
<div id="idH-----"/>
</div>
<div id="idI-----" class="editable">
<div id="idJ-----"/>
</div>
</div>
<div id="idL-----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Module&nbsp;<math xmlns="&mathml;">
<msub class="comp_id_hdr"><mi class="comp_id_hdr">Ex</mi><mn class="id_sub">11</mn
>
</msub>
</math></span>
</div>
<div class="editbuttontd">
<form action="#idL-----" method="POST" id="idL-----__" onsubmit="return submitForm(this,this);"
><a name="idL-----"/><input type="hidden" name="selector" value="idL-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
<div id="idM-----">
<div id="idN-----" class="editable"><a name="idP-----"/>
<form action="#idP-----" method="POST" id="idP-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idP-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idQ-----" class="fill"><a name="idQ-----"/><span class="header">Included module&nbsp;<math
 xmlns="&mathml;">
<mi class="comp_id_hdr">Standard</mi>
</math></span>
</div>
</div>
<div id="idR-----" class="editable"><a name="idT-----"/>
<form action="#idT-----" method="POST" id="idT-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idT-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idU-----" class="fill"><a name="idU-----"/><span class="header">Included module&nbsp;<math
 xmlns="&mathml;">
<mi class="comp_id_hdr">Xml_mod</mi>
</math></span>
</div>
</div>
<div id="idV-----" class="editable"><a name="idX-----"/>
<form action="#idX-----" method="POST" id="idX-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idX-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idY-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><b>11. CVIČENIE Z PREDMETU ÚVOD DO DEKLARATÍVNEHO PROGRAMOVANIA</b>
</p>
<p>http://ii.fmph.uniba.sk/cl/courses/1-AIN-505-udp/0809ls/ex/ex11.zip
</p>
</div>
<div class="editbuttontd">
<form action="#idY-----" method="POST" id="idY-----__" onsubmit="return submitForm(this,this);"
><a name="idY-----"/><input type="hidden" name="selector" value="idY-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idZ-----" class="editable"><a name="idb-----"/>
<form action="#idb-----" method="POST" id="idb-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idb-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idc-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><i>Dátum:</i> 4. a 6. 5. 2009
</p>
<p><i>Odporúčaná verzia CL:</i> <b>5.81.19</b>
</p>
<p><i>WWW stránka predmetu:</i> http://ii.fmph.uniba.sk/cl/courses/1-AIN-505-udp/0809ls?lang=sk
</p>
</div>
<div class="editbuttontd">
<form action="#idc-----" method="POST" id="idc-----__" onsubmit="return submitForm(this,this);"
><a name="idc-----"/><input type="hidden" name="selector" value="idc-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idd-----" class="editable"><a name="idf-----"/>
<form action="#idf-----" method="POST" id="idf-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idf-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idg-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p>Preskočte nasledujúce komponenty po nadpis „CVIČENIE“.
</p>
</div>
<div class="editbuttontd">
<form action="#idg-----" method="POST" id="idg-----__" onsubmit="return submitForm(this,this);"
><a name="idg-----"/><input type="hidden" name="selector" value="idg-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idh-----" class="editable"><a name="idj-----"/>
<form action="#idj-----" method="POST" id="idj-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idj-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idk-----" class="fill"><a name="idk-----"/><span class="header">Application display&nbsp;<em
>Cdots</em>&nbsp;/&nbsp;0: <math xmlns="&mathml;">
<mo>&ctdot;</mo>
</math></span>
</div>
</div>
<div id="idl-----" class="editable"><a name="idn-----"/>
<form action="#idn-----" method="POST" id="idn-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idn-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="ido-----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<acronym title="This function is a constructor"
 class="fun_constr"><math xmlns="&mathml;">
<mi class="inh_col_id">Fill_in</mi>
</math></acronym>&nbsp;/&nbsp;0 displayed by&nbsp;<em>Cdots</em> as&nbsp;<math
 xmlns="&mathml;">
<mo>&ctdot;</mo>
</math></span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mo>&ctdot;</mo><mo>=</mo><mn class="builtin">20090504</mn>
</math>
</div>
<div class="editbuttontd">
<form action="#ido-----" method="POST" id="ido-----__" onsubmit="return submitForm(this,this);"
><a name="ido-----"/><input type="hidden" name="selector" value="ido-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idp-----" class="editable"><a name="idr-----"/>
<form action="#idr-----" method="POST" id="idr-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idr-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="ids-----" class="fill"><a name="ids-----"/><span class="header">Application display&nbsp;<em
>Format</em>&nbsp;/&nbsp;2: <math xmlns="&mathml;">
<msub class="ad_constr_arg"><mi>#</mi><mn>1</mn>
</msub><mo>:</mo>
<msub class="ad_constr_arg"><mi>#</mi><mn>2</mn>
</msub>
</math></span>
</div>
</div>
<div id="idt-----" class="editable"><a name="idv-----"/>
<form action="#idv-----" method="POST" id="idv-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idv-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idw-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><b>C V I Č E N I E</b>
</p>
</div>
<div class="editbuttontd">
<form action="#idw-----" method="POST" id="idw-----__" onsubmit="return submitForm(this,this);"
><a name="idw-----"/><input type="hidden" name="selector" value="idw-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idx-----" class="editable"><a name="idz-----"/>
<form action="#idz-----" method="POST" id="idz-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idz-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id0-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><b>Úloha 1. Hello World.</b> Definujte konštantu (funkciu s aritou <math
 xmlns="&mathml;">
<mn class="builtin">0</mn>
</math>) <math xmlns="&mathml;">
<mi class="ident">Hello</mi><mo>::</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>, ktorá sa vyhodnotí do hodnoty typu <math xmlns="&mathml;">
<mi class="ident">Xml</mi>
</math> predstavujúcej jednoduchý XHTML dokument obsahujúci reťazec „Hello
 World!“ (alebo „Ahoj, svet!“). Svoju konštantu testujte pomocou query
</p>
<math xmlns="&mathml;" mode="display">
<mi class="ident">Hello</mi><mo>=</mo><mi>x</mi><mo>:</mo><mi class="ident">Xml</mi
>
</math>
<p>prípadne
</p>
<math xmlns="&mathml;" mode="display">
<mi class="ident">Hello</mi><mo>=</mo><mi>x</mi><mo>:</mo><mi class="ident">Txml</mi
>
</math>
<p>Môžete použiť funkciu <math xmlns="&mathml;">
<mi class="ident">Html</mi>
<mrow class="cp1"><mo>(</mo><mi>t</mi><mo>,</mo><mi>b</mi><mo>)</mo>
</mrow>
</math> definovanú v module <math xmlns="&mathml;">
<mi class="ident">Xml_mod</mi>
</math>, ktorá obalí zoznam elementov <math xmlns="&mathml;">
<mi>b</mi>
</math> do kostry XHTML dokumentu (element <i>html</i> obsahujúci hlavičku
 s titulkom <math xmlns="&mathml;">
<mi>t</mi>
</math> a elementom <i>body</i>, ktorého obsahom bude <math xmlns="&mathml;"
>
<mi>b</mi>
</math>).
</p>
<p class="indented">Vyskúšajte rôzne elementy (odseky, nadpisy, …).
</p>
</div>
<div class="editbuttontd">
<form action="#id0-----" method="POST" id="id0-----__" onsubmit="return submitForm(this,this);"
><a name="id0-----"/><input type="hidden" name="selector" value="id0-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id1-----" class="editable"><a name="id3-----"/>
<form action="#id3-----" method="POST" id="id3-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id3-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id4-----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Hello</mi>
</math></span>&nbsp;/&nbsp;0</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Hello</mi><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#id4-----" method="POST" id="id4-----__" onsubmit="return submitForm(this,this);"
><a name="id4-----"/><input type="hidden" name="selector" value="id4-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id5-----" class="editable"><a name="id7-----"/>
<form action="#id7-----" method="POST" id="id7-----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id7-----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id8-----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><b>Úloha 2. Tabuľka faktoriálu.</b> Napíšte funkciu <math xmlns="&mathml;"
>
<mi class="ident">Qfact</mi><mo>::</mo><mi class="ident">N</mi><mo>&rarr;</mo
>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>, ktorá vyrobí tabuľku faktoriálov. Napríklad query
</p>
<math xmlns="&mathml;" mode="display">
<mi class="ident">Qfact</mi>
<mrow class="cp1"><mo>(</mo><mn class="builtin">10</mn><mo>)</mo>
</mrow><mo>=</mo><mi>x</mi><mo>:</mo><mi class="ident">Xml</mi>
</math>
<p>by mala vrátiť <math xmlns="&mathml;">
<mi class="ident">Xml</mi>
</math> hodnotu podobnú nasledujúcej konštante <math xmlns="&mathml;">
<mi class="ident">X_fa</mi>
</math>. Odporúčaná pomocná funkcia je opísaná za <math xmlns="&mathml;"
>
<mi class="ident">X_fa</mi>
</math>.
</p>
</div>
<div class="editbuttontd">
<form action="#id8-----" method="POST" id="id8-----__" onsubmit="return submitForm(this,this);"
><a name="id8-----"/><input type="hidden" name="selector" value="id8-----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id9-----" class="editable"><a name="id-A----"/>
<form action="#id-A----" method="POST" id="id-A----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id-A----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idAA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">X_fa</mi>
</math></span>&nbsp;/&nbsp;0</span><br/><a href="xmlconstant/X_fa" title="Open a new browser window to view this XML"
 class="xmlinnewwin" target="_blank">View <math xmlns="&mathml;">
<mi class="ident">X_fa</mi>
</math> in a new window</a>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">X_fa</mi><mo>=</mo>
</math>
<div class="xmlconstant"><div class="inlinedhtmltitle">Factorials</div
><table
  ><tr
    ><th> n</th
    ><th> n!</th
    ></tr
  ><tr
    ><th>0</th
    ><td>1</td
    ></tr
  ><tr
    ><th>1</th
    ><td>1</td
    ></tr
  ><tr
    ><th>2</th
    ><td>2</td
    ></tr
  ><tr
    ><th>3</th
    ><td>6</td
    ></tr
  ><tr
    ><th>4</th
    ><td>24</td
    ></tr
  ><tr
    ><th>5</th
    ><td>120</td
    ></tr
  ><tr
    ><th>6</th
    ><td>720</td
    ></tr
  ><tr
    ><th>7</th
    ><td>5040</td
    ></tr
  ><tr
    ><th>8</th
    ><td>40320</td
    ></tr
  ><tr
    ><th>9</th
    ><td>362880</td
    ></tr
  ></table
>
</div>
</div>
<div class="editbuttontd">
<form action="#idAA----" method="POST" id="idAA----__" onsubmit="return submitForm(this,this);"
><a name="idAA----"/><input type="hidden" name="selector" value="idAA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idBA----" class="editable"><a name="idDA----"/>
<form action="#idDA----" method="POST" id="idDA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idDA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idEA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Fact_rows</mi><mo>::</mo><mi class="ident">N</mi><mo class="builtin"
>,</mo><mi class="ident">N</mi><mo class="builtin">,</mo><mi class="ident">N</mi
><mo>&rarr;</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented">Táto pomocná funkcia vráti zoznam riadkov tabuľky (elementov
 <i>tr</i>). Každý riadok obsahuje hlavičkovú bunku (<i>th</i>) s hodnotou
 argumentu faktoriálu a dátovú bunku (<i>td</i>) s hodnotou faktoriálu pre
 tento argument.
</p>
<p class="indented">Funkcia má tri argumenty:
</p>
<ul>
<li>
<p><math xmlns="&mathml;">
<mi fontstyle="italic">max</mi>
</math>: celkový počet riadkov, ktoré treba vyrobiť;
</p>
</li>
<li>
<p><math xmlns="&mathml;">
<mi>n</mi>
</math>: aktuálny argument faktoriálu (na začiatku <math xmlns="&mathml;"
>
<mn class="builtin">0</mn>
</math>);
</p>
</li>
<li>
<p><math xmlns="&mathml;">
<mi>a</mi>
</math>: hodnota faktoriálu pre <math xmlns="&mathml;">
<mi>n</mi>
</math> (na začiatku <math xmlns="&mathml;">
<mn class="builtin">1</mn>
</math>).
</p>
</li>
</ul>
<p>Pri volaní <math xmlns="&mathml;">
<mi class="ident">Fact_rows</mi>
</math> sa argumenty inicializujú ako je uvedené v zozname. Argument <math
 xmlns="&mathml;">
<mi>n</mi>
</math> sa v rekurzii bude zvyšovať, kým nedosiahne <math xmlns="&mathml;"
>
<mi fontstyle="italic">max</mi>
</math> (tzv. <i>spätná rekurzia</i>). Hodnotu argumentu <math xmlns="&mathml;"
>
<mi>a</mi>
</math> treba pri rekurzívnom volaní aktualizovať, aby bola vždy rovná 
faktoriálu argumentu <math xmlns="&mathml;">
<mi>n</mi>
</math> v rekurzii. Použite uvedenú šablónu rekurzie.
</p>
<p class="indented"><math xmlns="&mathml;">
<mi class="ident">Xml</mi>
</math> hodnotu (<math xmlns="&mathml;">
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>) z čísla vyrobíte funkciou <math xmlns="&mathml;">
<mi class="ident">Showx</mi>
</math> z modulu <math xmlns="&mathml;">
<mi class="ident">Xml_mod</mi>
</math>. Napríklad <math xmlns="&mathml;">
<mi class="ident">Showx</mi>
<mrow class="cp1"><mo>(</mo><mn class="builtin">123</mn><mo>)</mo>
</mrow>
</math> vráti <math xmlns="&mathml;">
<mi class="ident">Xs</mi>
<mrow class="cp1"><mo>(</mo><ms class="clstring">123</ms><mo>)</mo>
</mrow><mo class="builtin">,</mo><mn class="builtin">0</mn>
</math>.
</p>
</div>
<div class="editbuttontd">
<form action="#idEA----" method="POST" id="idEA----__" onsubmit="return submitForm(this,this);"
><a name="idEA----"/><input type="hidden" name="selector" value="idEA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idFA----" class="editable"><a name="idHA----"/>
<form action="#idHA----" method="POST" id="idHA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idHA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idIA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Fact_rows</mi>
</math></span>&nbsp;/&nbsp;3</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Fact_rows</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>n</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>a</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo>
<mrow><mo>&ctdot;</mo><mo class="builtin">,</mo><mi class="ident">Fact_rows</mi
>
<mrow class="cp1"><mo>(</mo><mi fontstyle="italic">max</mi><mo>,</mo><mi>n</mi
><mo class="builtin">+</mo><mn class="builtin">1</mn><mo>,</mo><mo>&ctdot;</mo
><mo>)</mo>
</mrow>
</mrow><mo>&larr;</mo>
<mrow><mi>n</mi><mo class="builtin">&lt;</mo><mi fontstyle="italic">max</mi>
</mrow>
</math>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Fact_rows</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>n</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>a</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mn class="builtin">0</mn><mo>&larr;</mo>
<mrow><mi>n</mi><mo class="builtin">&gE;</mo><mi fontstyle="italic">max</mi>
</mrow>
</math>
</div>
<div class="editbuttontd">
<form action="#idIA----" method="POST" id="idIA----__" onsubmit="return submitForm(this,this);"
><a name="idIA----"/><input type="hidden" name="selector" value="idIA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idJA----" class="editable"><a name="idLA----"/>
<form action="#idLA----" method="POST" id="idLA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idLA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idMA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Qfact</mi><mo>::</mo><mi class="ident">N</mi><mo>&rarr;</mo
>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented">Ak implemetnujete <math xmlns="&mathml;">
<mi class="ident">Fact_rows</mi>
</math>, hlavná funkcia <math xmlns="&mathml;">
<mi class="ident">Qfact</mi>
</math> pozostáva zo zavolania <math xmlns="&mathml;">
<mi class="ident">Fact_rows</mi>
</math> s vyššie naznačenými začiatočnými argumentami a z obalenia jej
 výsledku do tabuľky (s hlavičkovým riadkom), ktorú potom použije ako 
telo XHTML dokumentu vo funkcii <math xmlns="&mathml;">
<mi class="ident">Html</mi>
</math>.
</p>
</div>
<div class="editbuttontd">
<form action="#idMA----" method="POST" id="idMA----__" onsubmit="return submitForm(this,this);"
><a name="idMA----"/><input type="hidden" name="selector" value="idMA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idNA----" class="editable"><a name="idPA----"/>
<form action="#idPA----" method="POST" id="idPA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idPA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idQA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Qfact</mi>
</math></span></span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Qfact</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi>n</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#idQA----" method="POST" id="idQA----__" onsubmit="return submitForm(this,this);"
><a name="idQA----"/><input type="hidden" name="selector" value="idQA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idRA----" class="editable"><a name="idTA----"/>
<form action="#idTA----" method="POST" id="idTA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idTA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idUA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><b>Úloha 3. Tabuľka násobenia.</b> Naprogramujte funkciu <math xmlns="&mathml;"
>
<mi class="ident">Qmul</mi><mo>::</mo><mi class="ident">N</mi><mo>&rarr;</mo
>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>, ktorá vytvorí dvojrozmernú tabuľku násobenia. Napríklad výsledkom
</p>
<math xmlns="&mathml;" mode="display">
<mi class="ident">Qmul</mi>
<mrow class="cp1"><mo>(</mo><mn class="builtin">10</mn><mo>)</mo>
</mrow><mo>=</mo><mi>x</mi><mo>:</mo><mi class="ident">Xml</mi>
</math>
<p>by mala byť <math xmlns="&mathml;">
<mi class="ident">Xml</mi>
</math> hodnota podobná nasledujúcej konštante <math xmlns="&mathml;">
<mi class="ident">X_mul</mi>
</math>. Bunka v 4. riadku a 7. stĺpci obsahuje hodnotu <math xmlns="&mathml;"
>
<mn class="builtin">4</mn><mo class="builtin">&sdot;</mo><mn class="builtin"
>7</mn><mo>=</mo><mn class="builtin">28</mn>
</math>.
</p>
</div>
<div class="editbuttontd">
<form action="#idUA----" method="POST" id="idUA----__" onsubmit="return submitForm(this,this);"
><a name="idUA----"/><input type="hidden" name="selector" value="idUA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idVA----" class="editable"><a name="idXA----"/>
<form action="#idXA----" method="POST" id="idXA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idXA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idYA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">X_mul</mi>
</math></span>&nbsp;/&nbsp;0</span><br/><a href="xmlconstant/X_mul" title="Open a new browser window to view this XML"
 class="xmlinnewwin" target="_blank">View <math xmlns="&mathml;">
<mi class="ident">X_mul</mi>
</math> in a new window</a>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">X_mul</mi><mo>=</mo>
</math>
<div class="xmlconstant"><div class="inlinedhtmltitle">Table of multiplication</div
><table
  ><tr
    ><th>x</th
    ><th>0</th
    ><th>1</th
    ><th>2</th
    ><th>3</th
    ><th>4</th
    ><th>5</th
    ><th>6</th
    ><th>7</th
    ><th>8</th
    ><th>9</th
    ></tr
  ><tr
    ><th>0</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ></tr
  ><tr
    ><th>1</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,253,0)">1</div
      ></td
    ><td><div style="background-color:rgb(255,250,0)">2</div
      ></td
    ><td><div style="background-color:rgb(255,248,0)">3</div
      ></td
    ><td><div style="background-color:rgb(255,245,0)">4</div
      ></td
    ><td><div style="background-color:rgb(255,243,0)">5</div
      ></td
    ><td><div style="background-color:rgb(255,240,0)">6</div
      ></td
    ><td><div style="background-color:rgb(255,238,0)">7</div
      ></td
    ><td><div style="background-color:rgb(255,235,0)">8</div
      ></td
    ><td><div style="background-color:rgb(255,233,0)">9</div
      ></td
    ></tr
  ><tr
    ><th>2</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,250,0)">2</div
      ></td
    ><td><div style="background-color:rgb(255,245,0)">4</div
      ></td
    ><td><div style="background-color:rgb(255,240,0)">6</div
      ></td
    ><td><div style="background-color:rgb(255,235,0)">8</div
      ></td
    ><td><div style="background-color:rgb(255,230,0)">10</div
      ></td
    ><td><div style="background-color:rgb(255,225,0)">12</div
      ></td
    ><td><div style="background-color:rgb(255,220,0)">14</div
      ></td
    ><td><div style="background-color:rgb(255,215,0)">16</div
      ></td
    ><td><div style="background-color:rgb(255,210,0)">18</div
      ></td
    ></tr
  ><tr
    ><th>3</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,248,0)">3</div
      ></td
    ><td><div style="background-color:rgb(255,240,0)">6</div
      ></td
    ><td><div style="background-color:rgb(255,233,0)">9</div
      ></td
    ><td><div style="background-color:rgb(255,225,0)">12</div
      ></td
    ><td><div style="background-color:rgb(255,217,0)">15</div
      ></td
    ><td><div style="background-color:rgb(255,210,0)">18</div
      ></td
    ><td><div style="background-color:rgb(255,202,0)">21</div
      ></td
    ><td><div style="background-color:rgb(255,194,0)">24</div
      ></td
    ><td><div style="background-color:rgb(255,187,0)">27</div
      ></td
    ></tr
  ><tr
    ><th>4</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,245,0)">4</div
      ></td
    ><td><div style="background-color:rgb(255,235,0)">8</div
      ></td
    ><td><div style="background-color:rgb(255,225,0)">12</div
      ></td
    ><td><div style="background-color:rgb(255,215,0)">16</div
      ></td
    ><td><div style="background-color:rgb(255,204,0)">20</div
      ></td
    ><td><div style="background-color:rgb(255,194,0)">24</div
      ></td
    ><td><div style="background-color:rgb(255,184,0)">28</div
      ></td
    ><td><div style="background-color:rgb(255,174,0)">32</div
      ></td
    ><td><div style="background-color:rgb(255,164,0)">36</div
      ></td
    ></tr
  ><tr
    ><th>5</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,243,0)">5</div
      ></td
    ><td><div style="background-color:rgb(255,230,0)">10</div
      ></td
    ><td><div style="background-color:rgb(255,217,0)">15</div
      ></td
    ><td><div style="background-color:rgb(255,204,0)">20</div
      ></td
    ><td><div style="background-color:rgb(255,192,0)">25</div
      ></td
    ><td><div style="background-color:rgb(255,179,0)">30</div
      ></td
    ><td><div style="background-color:rgb(255,166,0)">35</div
      ></td
    ><td><div style="background-color:rgb(255,153,0)">40</div
      ></td
    ><td><div style="background-color:rgb(255,141,0)">45</div
      ></td
    ></tr
  ><tr
    ><th>6</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,240,0)">6</div
      ></td
    ><td><div style="background-color:rgb(255,225,0)">12</div
      ></td
    ><td><div style="background-color:rgb(255,210,0)">18</div
      ></td
    ><td><div style="background-color:rgb(255,194,0)">24</div
      ></td
    ><td><div style="background-color:rgb(255,179,0)">30</div
      ></td
    ><td><div style="background-color:rgb(255,164,0)">36</div
      ></td
    ><td><div style="background-color:rgb(255,148,0)">42</div
      ></td
    ><td><div style="background-color:rgb(255,133,0)">48</div
      ></td
    ><td><div style="background-color:rgb(255,118,0)">54</div
      ></td
    ></tr
  ><tr
    ><th>7</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,238,0)">7</div
      ></td
    ><td><div style="background-color:rgb(255,220,0)">14</div
      ></td
    ><td><div style="background-color:rgb(255,202,0)">21</div
      ></td
    ><td><div style="background-color:rgb(255,184,0)">28</div
      ></td
    ><td><div style="background-color:rgb(255,166,0)">35</div
      ></td
    ><td><div style="background-color:rgb(255,148,0)">42</div
      ></td
    ><td><div style="background-color:rgb(255,131,0)">49</div
      ></td
    ><td><div style="background-color:rgb(255,113,0)">56</div
      ></td
    ><td><div style="background-color:rgb(255,95,0)">63</div
      ></td
    ></tr
  ><tr
    ><th>8</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,235,0)">8</div
      ></td
    ><td><div style="background-color:rgb(255,215,0)">16</div
      ></td
    ><td><div style="background-color:rgb(255,194,0)">24</div
      ></td
    ><td><div style="background-color:rgb(255,174,0)">32</div
      ></td
    ><td><div style="background-color:rgb(255,153,0)">40</div
      ></td
    ><td><div style="background-color:rgb(255,133,0)">48</div
      ></td
    ><td><div style="background-color:rgb(255,113,0)">56</div
      ></td
    ><td><div style="background-color:rgb(255,92,0)">64</div
      ></td
    ><td><div style="background-color:rgb(255,72,0)">72</div
      ></td
    ></tr
  ><tr
    ><th>9</th
    ><td><div style="background-color:rgb(255,255,0)">0</div
      ></td
    ><td><div style="background-color:rgb(255,233,0)">9</div
      ></td
    ><td><div style="background-color:rgb(255,210,0)">18</div
      ></td
    ><td><div style="background-color:rgb(255,187,0)">27</div
      ></td
    ><td><div style="background-color:rgb(255,164,0)">36</div
      ></td
    ><td><div style="background-color:rgb(255,141,0)">45</div
      ></td
    ><td><div style="background-color:rgb(255,118,0)">54</div
      ></td
    ><td><div style="background-color:rgb(255,95,0)">63</div
      ></td
    ><td><div style="background-color:rgb(255,72,0)">72</div
      ></td
    ><td><div style="background-color:rgb(255,49,0)">81</div
      ></td
    ></tr
  ></table
>
</div>
</div>
<div class="editbuttontd">
<form action="#idYA----" method="POST" id="idYA----__" onsubmit="return submitForm(this,this);"
><a name="idYA----"/><input type="hidden" name="selector" value="idYA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idZA----" class="editable"><a name="idbA----"/>
<form action="#idbA----" method="POST" id="idbA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idbA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idcA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Mul_cell</mi><mo>::</mo><mi class="ident">N</mi><mo class="builtin"
>,</mo><mi class="ident">N</mi><mo>&rarr;</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented"><math xmlns="&mathml;">
<mi class="ident">Mul_cell</mi>
<mrow class="cp1"><mo>(</mo><mi>r</mi><mo>,</mo><mi>c</mi><mo>)</mo>
</mrow>
</math> vráti obsah bunky tabuľky v riadku <math xmlns="&mathml;">
<mi>r</mi>
</math> a stĺpci <math xmlns="&mathml;">
<mi>c</mi>
</math>.
</p>
</div>
<div class="editbuttontd">
<form action="#idcA----" method="POST" id="idcA----__" onsubmit="return submitForm(this,this);"
><a name="idcA----"/><input type="hidden" name="selector" value="idcA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="iddA----" class="editable"><a name="idfA----"/>
<form action="#idfA----" method="POST" id="idfA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idfA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idgA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Mul_cell</mi>
</math></span>&nbsp;/&nbsp;2</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Mul_cell</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi>r</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>c</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#idgA----" method="POST" id="idgA----__" onsubmit="return submitForm(this,this);"
><a name="idgA----"/><input type="hidden" name="selector" value="idgA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idhA----" class="editable"><a name="idjA----"/>
<form action="#idjA----" method="POST" id="idjA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idjA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idkA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Mul_row</mi><mo>::</mo><mi class="ident">N</mi><mo class="builtin"
>,</mo><mi class="ident">N</mi><mo class="builtin">,</mo><mi class="ident">N</mi
><mo>&rarr;</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented"><math xmlns="&mathml;">
<mi class="ident">Mul_row</mi>
<mrow class="cp1"><mo>(</mo><mi fontstyle="italic">max</mi><mo>,</mo><mi>r</mi
><mo>,</mo><mi>c</mi><mo>)</mo>
</mrow>
</math> vyrobí obsah <math xmlns="&mathml;">
<mi>r</mi>
</math>-tého riadku tabuľky (zoznam buniek). Argument <math xmlns="&mathml;"
>
<mi>c</mi>
</math> obsahuje aktuálny stĺpec, argument <math xmlns="&mathml;">
<mi fontstyle="italic">max</mi>
</math> udáva celkový počet buniek v riadku. Pri volaní <math xmlns="&mathml;"
>
<mi class="ident">Mul_row</mi>
</math> sa <math xmlns="&mathml;">
<mi>c</mi>
</math> inicializuje na <math xmlns="&mathml;">
<mn class="builtin">0</mn>
</math> a v rekurzii sa bude zvyšovať, kým nedosiahne <math xmlns="&mathml;"
>
<mi fontstyle="italic">max</mi>
</math>. Schéma rekurzie je podobná ako pri funkcii <math xmlns="&mathml;"
>
<mi class="ident">Fact_rows</mi>
</math>
</p>
</div>
<div class="editbuttontd">
<form action="#idkA----" method="POST" id="idkA----__" onsubmit="return submitForm(this,this);"
><a name="idkA----"/><input type="hidden" name="selector" value="idkA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idlA----" class="editable"><a name="idnA----"/>
<form action="#idnA----" method="POST" id="idnA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idnA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idoA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Mul_row</mi>
</math></span>&nbsp;/&nbsp;3</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Mul_row</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>r</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>c</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#idoA----" method="POST" id="idoA----__" onsubmit="return submitForm(this,this);"
><a name="idoA----"/><input type="hidden" name="selector" value="idoA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idpA----" class="editable"><a name="idrA----"/>
<form action="#idrA----" method="POST" id="idrA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idrA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idsA----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Mul_rows</mi><mo>::</mo><mi class="ident">N</mi><mo class="builtin"
>,</mo><mi class="ident">N</mi><mo>&rarr;</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented"><math xmlns="&mathml;">
<mi class="ident">Mul_rows</mi>
<mrow class="cp1"><mo>(</mo><mi fontstyle="italic">max</mi><mo>,</mo><mi>r</mi
><mo>)</mo>
</mrow>
</math> vyrobí zoznam riadkov (tr) tabuľky násobenia. Obsah každého riadku
 tvorí hlavičková bunka s jeho číslom a dátové bunky vyrobené <math xmlns="&mathml;"
>
<mi class="ident">Mul_row</mi>
</math>. Argument <math xmlns="&mathml;">
<mi fontstyle="italic">max</mi>
</math> udáva počet riadkov aj stĺpcov tabuľky (teda počet dátových buniek
 v riadku), <math xmlns="&mathml;">
<mi>r</mi>
</math> je číslo aktuálneho riadku.
</p>
</div>
<div class="editbuttontd">
<form action="#idsA----" method="POST" id="idsA----__" onsubmit="return submitForm(this,this);"
><a name="idsA----"/><input type="hidden" name="selector" value="idsA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idtA----" class="editable"><a name="idvA----"/>
<form action="#idvA----" method="POST" id="idvA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idvA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idwA----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Mul_rows</mi>
</math></span>&nbsp;/&nbsp;2</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Mul_rows</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>r</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#idwA----" method="POST" id="idwA----__" onsubmit="return submitForm(this,this);"
><a name="idwA----"/><input type="hidden" name="selector" value="idwA----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idxA----" class="editable"><a name="idzA----"/>
<form action="#idzA----" method="POST" id="idzA----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idzA----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id0A----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Mul_hd_row</mi><mo>::</mo><mi class="ident">N</mi><mo class="builtin"
>,</mo><mi class="ident">N</mi><mo>&rarr;</mo>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented"><math xmlns="&mathml;">
<mi class="ident">Mul_hd_row</mi>
<mrow class="cp1"><mo>(</mo><mi fontstyle="italic">max</mi><mo>,</mo><mi>c</mi
><mo>)</mo>
</mrow>
</math> vyrobí zoznam hlavičkových buniek tvoriacich záhlavie tabuľky. 
Argument <math xmlns="&mathml;">
<mi fontstyle="italic">max</mi>
</math> udáva celkový počet buniek, <math xmlns="&mathml;">
<mi>c</mi>
</math> je číslo aktuálneho stĺpca.
</p>
</div>
<div class="editbuttontd">
<form action="#id0A----" method="POST" id="id0A----__" onsubmit="return submitForm(this,this);"
><a name="id0A----"/><input type="hidden" name="selector" value="id0A----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id1A----" class="editable"><a name="id3A----"/>
<form action="#id3A----" method="POST" id="id3A----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id3A----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id4A----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Mul_hd_row</mi>
</math></span>&nbsp;/&nbsp;2</span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Mul_hd_row</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>,</mo>
<mstyle class="bvar"><mi>c</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#id4A----" method="POST" id="id4A----__" onsubmit="return submitForm(this,this);"
><a name="id4A----"/><input type="hidden" name="selector" value="id4A----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id5A----" class="editable"><a name="id7A----"/>
<form action="#id7A----" method="POST" id="id7A----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id7A----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="id8A----" class="fieldwithbuttons editable fill">
<div class="fill">
<div class="header">Remark&nbsp;<math xmlns="&mathml;">
<mi class="comp_id_hdr"></mi>
</math>
</div>
<p><math xmlns="&mathml;">
<mi class="ident">Qmul</mi><mo>::</mo><mi class="ident">N</mi><mo>&rarr;</mo
>
<mrow class="cp1"><mo>[</mo><mi class="ident">X</mi><mo>]</mo>
</mrow>
</math>
</p>
<p class="indented">Hlavná funkcia vytvorí tabuľku ako kombináciu záhlavia
 (<math xmlns="&mathml;">
<mi class="ident">Mul_hd_row</mi>
</math>) a tela (<math xmlns="&mathml;">
<mi class="ident">Mul_rows</mi>
</math>) a obalí ju do kostry XHTML dokumentu.
</p>
</div>
<div class="editbuttontd">
<form action="#id8A----" method="POST" id="id8A----__" onsubmit="return submitForm(this,this);"
><a name="id8A----"/><input type="hidden" name="selector" value="id8A----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="id9A----" class="editable"><a name="id-B----"/>
<form action="#id-B----" method="POST" id="id-B----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="id-B----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Ins/Del" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
<div><input type="submit" name="char" value="Expand" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
<div id="idAB----" class="fieldwithbuttons editable fill">
<div class="fill"><span class="header">Function&nbsp;<span class="comp_id_hdr"
><math xmlns="&mathml;">
<mi class="inh_col_id">Qmul</mi>
</math></span></span><br/>
<math xmlns="&mathml;" mode="display" class="clause">
<mi class="ident">Qmul</mi>
<mrow class="cp1"><mo>(</mo>
<mstyle class="bvar"><mi fontstyle="italic">max</mi>
</mstyle><mo>)</mo>
</mrow><mo>=</mo><mo>&ctdot;</mo>
</math>
</div>
<div class="editbuttontd">
<form action="#idAB----" method="POST" id="idAB----__" onsubmit="return submitForm(this,this);"
><a name="idAB----"/><input type="hidden" name="selector" value="idAB----"/><input
 type="submit" name="action" value="Edit" class="editbutton" onclick="return submitForm(this.form,this);"
/><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
</div>
</div>
</div>
<div id="idBB----" class="editable"><a name="idCB----"/>
<form action="#idCB----" method="POST" id="idCB----" onsubmit="return submitForm(this,this);"
><input type="hidden" name="action" value="button"/><input type="hidden" name="selector"
 value="idCB----"/>
<div class="separatorbutton fill">
<div><pre><span class="fg3"></span></pre>
</div>
<div class="fill">
<hr/>
</div>
<div><input type="submit" name="char" value="Insert" class="button" onclick="return submitForm(this.form,this);"
/>
</div>
</div>
</form>
</div>
</div>
<div class="namedseparator fill">
<div>
<div class="vert_sep_name">Query:
</div>
<div class="fill">
<hr/>
</div>
</div>
</div>
<form action="#idEB----" method="POST" id="idEB----" onsubmit="return submitForm(this,this);"
><a name="idEB----"/><input type="hidden" name="selector" value="idEB----"/>
<div class="fieldwithbuttons editable fill">
<div class="fill"><textarea name="data" cols="78" rows="3">0 = x

</textarea>
</div>
<div class="editbuttontd"><input type="submit" name="action" value="OK" class="editbutton"
 onclick="return submitForm(this.form,this);"/><br/><input type="submit" name="action"
 value="Cancel" class="editbutton" onclick="return submitForm(this.form,this);"
/>
</div>
</div><input type="hidden" name="xoff" value="0"/><input type="hidden" name="yoff"
 value="0"/>
</form>
<div class="namedseparator fill">
<div>
<div class="vert_sep_name">Results:
</div>
<div class="fill">
<hr/>
</div>
</div>
</div>
<div id="idFB----" class="fill"><a name="idFB----"/>
<div>Heap used:&nbsp;453708 free:&nbsp;133763324
</div>
<div>Time used:&nbsp;0:0:0:75
</div>
</div>
</div>
</div>
</body></html>