Commit ba7efa7e authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-12-28 01:55:44 by afrisch] Demo

Original author: afrisch
Date: 2004-12-28 01:55:44+00:00
parent b736e529
...@@ -2,30 +2,75 @@ ...@@ -2,30 +2,75 @@
<page name="demo"> <page name="demo">
<title>CDuce demo</title> <title>CDuce demo</title>
<box title="Compilation of pattern matching" link="pm_compil"> <box title="XML elements" link="xml">
<p>This example demonstrates the efficient compilation of pattern <p>XML elements.</p>
matching.</p> <demo><include-verbatim file="examples/"/></demo>
<demo><include-verbatim file="examples/"/></demo> </box>
<box link="functions" title="Functions">
<p>Several syntaxes to define functions.</p>
<demo><include-verbatim file="examples/"/></demo>
<box link="mutrec" title="Mutual recursion">
<p>Mutual toplevel definition for types and functions.</p>
<demo><include-verbatim file="examples/"/></demo>
</box> </box>
<box title="Integers" link="ints"> <box link="sequence" title="Sequence literals">
<p> <p>How to write sequences.</p>
Let's begin with integers, arithmetic, and, obviously, the <demo><include-verbatim file="examples/"/></demo>
factorial function. </box>
<demo> <box link="seqtypes" title="Sequence types">
let x = 2;; <p>Types for sequences.</p>
let a = x * 10;; <demo><include-verbatim file="examples/"/></demo>
<box link="integers" title="The factorial function">
<p>What about computing 10000! ?</p>
<demo><include-verbatim file="examples/"/></demo>
<box link="sumtype" title="Sum types">
<p>How to simulate ML sum types.</p>
<demo><include-verbatim file="examples/"/></demo>
<include-verbatim file="examples/"/> <box link="ovfun" title="Overloaded functions">
</demo> <p>This examples demonstrates the use of overloaded functions.</p>
<demo><include-verbatim file="examples/"/></demo>
</box> </box>
<box title="Strings" link="strs"> <box link="note" title="Footnotes">
<demo> <p>This example shows how to bind an XML element with surrounding text.</p>
let x = "abc";; <demo><include-verbatim file="examples/"/></demo>
let a = [ !x 'xyz' ] @ "123";; </box>
<box link="biblio" title="Bibliography">
<p>The good old XML bibliography example.</p>
<demo><include-verbatim file="examples/"/></demo>
<box link="projection" title="Projection">
<p>Syntactic sugar for projection.</p>
<demo><include-verbatim file="examples/"/></demo>
<box link="xtransform" title="Tree transformations">
<p>How to perform XSLT-like transformations.</p>
<demo><include-verbatim file="examples/"/></demo>
<box link="reference" title="References">
<p>Mutable values.</p>
<demo><include-verbatim file="examples/"/></demo>
<box title="Compilation of pattern matching" link="pm_compil">
<p>This example demonstrates the efficient compilation of pattern
<demo><include-verbatim file="examples/"/></demo>
</box> </box>
</page> </page>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment