In the next sample we demonstrate working with the discriminated union type. This type is used for representing a data type that store one of several possible options (where the options are well known when writing the code). One common example of data type that can be represented using discriminated unions is an abstract syntax tree (i.e. an expression in some programming language):> // Declaration of the 'Expr' typetype Expr =| Binary of string...
Monday, December 8, 2008
Subscribe to:
Posts (Atom)