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

[r2003-07-08 07:47:57 by cvscast] Empty log message

Original author: cvscast
Date: 2003-07-08 07:47:57+00:00
parent d68f1ff3
...@@ -146,9 +146,9 @@ apply <code>split</code> recursively to the elements of <code>mc</code> and <cod ...@@ -146,9 +146,9 @@ apply <code>split</code> recursively to the elements of <code>mc</code> and <cod
]]></sample> ]]></sample>
<p> <p>
Here is Here is
the use of overloading: since <code>mc</code> is of type <code>[MPerson*]</code>}, then the use of overloading: since <code>mc</code> is of type <code>[MPerson*]</code>, then
by the overloaded type of <code>split</code> we can deduce that <code>s</code> is of type by the overloaded type of <code>split</code> we can deduce that <code>s</code> is of type
<code>[Man*]</code>}; similarly we deduce for <code>d</code> the type <code>[Woman*]</code>. From this <code>[Man*]</code>; similarly we deduce for <code>d</code> the type <code>[Woman*]</code>. From this
the type checker deduces that the expressions <code>&lt;sons>s</code> and the type checker deduces that the expressions <code>&lt;sons>s</code> and
<code>&lt;daughters></code> are of type <code>Sons</code> and <code>Daughters</code>, and therefore it <code>&lt;daughters></code> are of type <code>Sons</code> and <code>Daughters</code>, and therefore it
returns for the <code>split</code> function the type <code>(MPerson -> Man) &amp; (FPerson returns for the <code>split</code> function the type <code>(MPerson -> Man) &amp; (FPerson
......
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