<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Lambdoc document</title><meta charset="utf-8"/><link rel="stylesheet" href="css/lambdoc.css" media="all" title="Default"/></head><body><div class="doc doc_valid"><div class="doc_src_block"><pre class="doc_src_code">
<code class="doc_src_line doc_src_dummy"></code>
<code class="doc_src_line"><span class="doc_src_Kwd">type</span> 'a tree <span class="doc_src_Sym">=</span></code>
<code class="doc_src_line">    <span class="doc_src_Sym">|</span> <span class="doc_src_Type">Leaf</span></code>
<code class="doc_src_line">    <span class="doc_src_Sym">|</span> <span class="doc_src_Type">Node</span> <span class="doc_src_Kwd">of</span> 'a <span class="doc_src_Sym">*</span> 'a tree <span class="doc_src_Sym">*</span> 'a tree</code>
<code class="doc_src_line"></code>
<code class="doc_src_line"><span class="doc_src_Kwd">let</span> <span class="doc_src_Kwd">rec</span> count <span class="doc_src_Sym">=</span> <span class="doc_src_Kwd">function</span></code>
<code class="doc_src_line">    <span class="doc_src_Sym">|</span> <span class="doc_src_Type">Leaf</span>                     <span class="doc_src_Sym">-&gt;</span> <span class="doc_src_Num">0</span></code>
<code class="doc_src_line">    <span class="doc_src_Sym">|</span> <span class="doc_src_Type">Node</span> <span class="doc_src_Sym">(</span>node<span class="doc_src_Sym">,</span> left<span class="doc_src_Sym">,</span> right<span class="doc_src_Sym">)</span> <span class="doc_src_Sym">-&gt;</span> <span class="doc_src_Num">1</span> <span class="doc_src_Sym">+</span> count left <span class="doc_src_Sym">+</span> count right</code>
<code class="doc_src_line doc_src_dummy"></code></pre></div><div class="doc_src_block"><pre class="doc_src_code">
<code class="doc_src_line doc_src_dummy"></code>
<code class="doc_src_line">dario@localhost:~/lambtex$ make</code>
<code class="doc_src_line">lambcmd -f lambtex -t xhtml -i sample.lambtex -o index.html</code>
<code class="doc_src_line"></code>
<code class="doc_src_line">dario@localhost:~/lambtex$ file index.html</code>
<code class="doc_src_line">index.html: HTML document text</code>
<code class="doc_src_line doc_src_dummy"></code></pre></div></div></body></html>
