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

[r2003-07-22 20:43:38 by cvscast] Typos

Original author: cvscast
Date: 2003-07-22 20:43:39+00:00
parent 33e786e3
......@@ -383,8 +383,8 @@ are expressions.
They are two kinds of record types. Open record types
are written <code>{ %%l1%% = %%t1%%; %%...%%; %%ln%% = %%tn%%
}</code>, and closed record types are written
<code>{ %%l1%% = %%t1%%; %%...%%; %%ln%% = %%tn%%
}</code>.
<code>{| %%l1%% = %%t1%%; %%...%%; %%ln%% = %%tn%%
|}</code>.
Both denote all the record values where
the labels <code>%%li%%</code> are present and the associated values
are in the corresponding type. The distinction is that that open
......
......@@ -195,7 +195,7 @@ add a new pattern matching branch in the definition of the function
PhoneBook</code> elements. This yields the following <i>overloaded</i> function:
</p><a name="names3"/>
<sample><![CDATA[
let names3 (ParentBook -> [Name*] ; PhoneBook->[String*])
let names3 (ParentBook -> [Name*] ; PhoneBook -> [String*])
| <parentbook> x -> map x with <person>[ n _* ] -> n
| <phonebook> x -> map x with { name=n } -> n
]]></sample>
......@@ -207,7 +207,7 @@ returns a list of strings. We can factorize the two branches in a unique
alternative pattern:
</p>
<sample><![CDATA[
let names4 (ParentBook -> [Name*] ; PhoneBook->[String*])
let names4 (ParentBook -> [Name*] ; PhoneBook -> [String*])
<_> x -> map x with ( <person>[ n _* ] | { name=n } ) -> n
]]></sample>
<p>The interface ensures that the two representations will never mix.</p>
......
......@@ -104,7 +104,7 @@ any, otherwise the last e-mail, if any, otherwise any telephone number, or the
string <code>"no contact"</code>:
</p>
<sample><![CDATA[
let preferred_contact(Person->String)
let preferred_contact(Person -> String)
<_>[ _ _ ( _*? <tel kind="work">x) | (_* <email>x) | <tel>x ] -> x
| _ -> "no contact"
]]></sample>
......@@ -114,4 +114,4 @@ the only possible remaining case).
</p>
</box>
</page>
\ No newline at end of file
</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