Commit 317c8479 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-01-31 23:38:57 by beppe] Empty log message

Original author: beppe
Date: 2004-01-31 23:38:57+00:00
parent 15bc5062
......@@ -9,6 +9,7 @@
<include file="tutorial/overloading.xml"/>
<include file="tutorial/patterns.xml"/>
<include file="tutorial/errors.xml"/>
<include file="tutorial/queries.xml"/>
<include file="tutorial/higherorder.xml"/>
......@@ -56,7 +56,7 @@ code by defining a body that skips the check of the tags:
However this optimization would be useless since it is already done by the
implementation (see ???) and, of course, it
implementation (for technical details see <a href="">this paper</a>) and, of course, it
would make the code less readable. If instead of extracting the list of
<i>all</i> parents we wanted to extract the sublist containing only
parents with exactly two children, then we had to replace <code>transform</code> for <code>map</code>:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="tutorial_queries">
You can cut and paste the code on this page and
test it on the <a href="cgi-bin/cduce">online interpreter</a>.
<box title="Select from where" link="sel">
CDuce is endowed with a <code>select_from_where</code> syntax to perform some SQL-like queries. The general form of select expressions is
select %%e%% from
%%p1%% in %%e1%%
%%p2%% in %%e2%%
%%pn%% in %%en%%
where %%b%%
where <code>%%e%%</code> is an expression <code>%%b%%</code> a boolean expression, the <code>%%pi%%</code>'s are patterns, and the <code>%%ei%%</code>'s are sequence expressions.
<b style="color:#FF0080">TO BE DONE (XPATH-like syntax and examples)</b>
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