Adobe PDF
Adobe PDF
Adobe PDF
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Polymorphism - Subtyping<br />
Given function types A1B1 and A2B2<br />
when one of them is the subtype of the other?<br />
Given<br />
type Digit = 0..9;<br />
type Bit = 0..1;<br />
type DigitChar = '0'..'9';<br />
Conisder the function type<br />
type P = Digit Char<br />
and the function types:<br />
type F = Digit DigitChar<br />
type G = Bit Char<br />
type H = Int DigitChar<br />
Is F