Go backward to Recursive Definitions
Go up to Top
Go forward to Information Hiding
Existential Quantification
- Existential type quantification:
- p: exists a. t(a)
- For some type , p has type t()
- Examples:
- (3, 4): exists a. a x a
- (3, 4): exists a. a
- Constant can satisfy different existential types!
- Sample existential types:
- type Top = exists a. a (type of any value)
- exists a. exists b. a x b (type of any pair)
- Particularly useful:
- x: exists a. a x (a Int)
- (snd(x))(fst(x))
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: understand.tex,v 1.1 1996/06/12 09:38:21 schreine Exp schreine