Skip to content

Commit ee0c5f3

Browse files
author
duchier
committed
documentation for mapping and generator
git-svn-id: https://gforge.info.ucl.ac.be/svn/mozart@15970 ada56829-ad1f-0410-b00f-83cda6628aec
1 parent 512498d commit ee0c5f3

File tree

3 files changed

+170
-1
lines changed

3 files changed

+170
-1
lines changed

generator.html

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2+
<HTML>
3+
<HEAD>
4+
<!-- EDIT -->
5+
<TITLE>Mozart Standard Library: Lazy Generators</TITLE>
6+
<STYLE>
7+
BODY {
8+
background-color: white;
9+
margin-left : 2cm;
10+
margin-right : 2cm;
11+
font-family : tahoma,arial,helvetica,sans-serif;
12+
}
13+
H1 {
14+
text-align : center;
15+
color : #9B0000;
16+
}
17+
H2 { color : #FF9933; }
18+
H4 { color : slateblue; }
19+
H3 { color : #881155; }
20+
H5 { color : darkslateblue; }
21+
CODE { color : #663366; }
22+
CODE,TT {
23+
font-family : "lucida console",courier,monospace;
24+
}
25+
CODE.DISPLAY {
26+
display : block;
27+
white-space : pre;
28+
margin-left : 2cm;
29+
margin-top : 1em;
30+
margin-bottom : 1em;
31+
}
32+
P.AUTHOR {
33+
text-align : center;
34+
font-weight : bold;
35+
}
36+
SPAN.MODULE {
37+
color : steelblue;
38+
}
39+
A { color : steelblue; }
40+
SPAN.COMMENT { color: #B22222; }
41+
SPAN.KEYWORD { color: #A020F0; }
42+
SPAN.STRING { color: #BC8F8F; }
43+
SPAN.FUNCTIONNAME { color: #0000FF; }
44+
SPAN.TYPE { color: #228B22; }
45+
SPAN.VARIABLENAME { color: #B8860B; }
46+
SPAN.REFERENCE { color: #5F9EA0; }
47+
SPAN.BUILTIN { color: #DA70D6; }
48+
</STYLE>
49+
</HEAD>
50+
<BODY>
51+
<!-- EDIT -->
52+
<H1>Lazy Generators</H1>
53+
<P CLASS="AUTHOR">Denys Duchier</P>
54+
<DL>
55+
<DT><B>module</B>
56+
<DD><SPAN CLASS="MODULE">x-oz://system/Generator.ozf</SPAN>
57+
</DL>
58+
<HR>
59+
60+
<P>This module provides <I>lazy generators</I>, i.e. functions that
61+
return lists which are lazily computed concurrently, by-need
62+
63+
<H2>Exports</H2>
64+
<DL>
65+
<DT><CODE>{Generator.Tails +L ?Tails}</CODE>
66+
<DD>returns a lazy list of all non-empty tails of list <CODE>L</CODE>
67+
<DT><CODE>{Generator.count +From +To +By ?L}</CODE>
68+
<DD>returns a lazy list of integers starting at <CODE>From</CODE>, ending at
69+
at most <CODE>To</CODE>, and in steps of <CODE>By</CODE>. Whether we count
70+
up or down is determined by the sign of <CODE>By</CODE>
71+
</DL>
72+
73+
<HR>
74+
</BODY>
75+
</HTML>

index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ <H1>Mozart Standard Library</H1>
6363
</UL>
6464
and the following general modules:
6565
<UL>
66-
<LI><A href="string.html"><CODE>x.oz://system/String.ozf</CODE>
66+
<LI><A href="generator.html"><CODE>x-oz://system/Generator.ozf</CODE>
67+
<LI><A href="mapping.html"><CODE>x-oz://system/Mapping.ozf</CODE>
68+
<LI><A href="string.html"><CODE>x-oz://system/String.ozf</CODE>
6769
</UL>
6870
<HR>
6971
</BODY>

mapping.html

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2+
<HTML>
3+
<HEAD>
4+
<!-- EDIT -->
5+
<TITLE>Mozart Standard Library: Mappings</TITLE>
6+
<STYLE>
7+
BODY {
8+
background-color: white;
9+
margin-left : 2cm;
10+
margin-right : 2cm;
11+
font-family : tahoma,arial,helvetica,sans-serif;
12+
}
13+
H1 {
14+
text-align : center;
15+
color : #9B0000;
16+
}
17+
H2 { color : #FF9933; }
18+
H4 { color : slateblue; }
19+
H3 { color : #881155; }
20+
H5 { color : darkslateblue; }
21+
CODE { color : #663366; }
22+
CODE,TT {
23+
font-family : "lucida console",courier,monospace;
24+
}
25+
CODE.DISPLAY {
26+
display : block;
27+
white-space : pre;
28+
margin-left : 2cm;
29+
margin-top : 1em;
30+
margin-bottom : 1em;
31+
}
32+
P.AUTHOR {
33+
text-align : center;
34+
font-weight : bold;
35+
}
36+
SPAN.MODULE {
37+
color : steelblue;
38+
}
39+
A { color : steelblue; }
40+
SPAN.COMMENT { color: #B22222; }
41+
SPAN.KEYWORD { color: #A020F0; }
42+
SPAN.STRING { color: #BC8F8F; }
43+
SPAN.FUNCTIONNAME { color: #0000FF; }
44+
SPAN.TYPE { color: #228B22; }
45+
SPAN.VARIABLENAME { color: #B8860B; }
46+
SPAN.REFERENCE { color: #5F9EA0; }
47+
SPAN.BUILTIN { color: #DA70D6; }
48+
</STYLE>
49+
</HEAD>
50+
<BODY>
51+
<!-- EDIT -->
52+
<H1>Mappings</H1>
53+
<P CLASS="AUTHOR">Denys Duchier</P>
54+
<DL>
55+
<DT><B>module</B>
56+
<DD><SPAN CLASS="MODULE">x-oz://system/Mapping.ozf</SPAN>
57+
</DL>
58+
<HR>
59+
60+
<P>This module provides a uniform interface to standard <I>mapping</I> datatypes,
61+
i.e. records, dictionaries and arrays
62+
63+
<H2>Exports</H2>
64+
<DL>
65+
<DT><CODE>{Mapping.get +M +Key ?Value}</CODE>
66+
<DD>returns the <CODE>Value</CODE> associated with <CODE>Key</CODE> in
67+
mapping <CODE>M</CODE>
68+
<DT><CODE>{Mapping.put +M +Key +Value}</CODE>
69+
<DD>sets the <CODE>Value</CODE> associated with <CODE>Key</CODE> in
70+
mapping <CODE>M</CODE> (assuming the latter is mutable)
71+
<DT><CODE>{Mapping.condGet +M +Key +Default ?Value}</CODE>
72+
<DT><CODE>{Mapping.condSelect +M +Key +Default ?Value}</CODE>
73+
<DD>returns the <CODE>Value</CODE> associated with <CODE>Key</CODE> in
74+
mapping <CODE>M</CODE>, or <CODE>Default</CODE> if none
75+
<DT><CODE>{Mapping.is +M ?B}</CODE>
76+
<DD>returns true iff <CODE>M</CODE> is a mapping
77+
<DT><CODE>{Mapping.isMutable +M ?B}</CODE>
78+
<DD>returns true iff <CODE>M</CODE> is a mutable mapping
79+
<DT><CODE>{Mapping.items +M ?L}</CODE>
80+
<DT><CODE>{Mapping.toList +M ?L}</CODE>
81+
<DD>returns a list of the values in the mapping
82+
<DT><CODE>{Mapping.keys +M ?L}</CODE>
83+
<DT><CODE>{Mapping.arity +M ?L}</CODE>
84+
<DD>returns a list of the keys of the mapping
85+
<DT><CODE>{Mapping.entries +M ?L}</CODE>
86+
<DT><CODE>{Mapping.toListInd +M ?L}</CODE>
87+
<DD>returns a list of the entries <CODE>Key#Value</CODE> in the mapping
88+
</DL>
89+
90+
<HR>
91+
</BODY>
92+
</HTML>

0 commit comments

Comments
 (0)