🍔 Quiz
type Color1 = int * int * int
type Color2 = Red | Green | Blue
type Color3 = Red=1 | Green=2 | Blue=3
type Color4 = { Red: int; Green: int; Blue: int }
type Color5 = {| Red: int; Green: int; Blue: int |}
type Color6 = Color of Red: int * Green: int * Blue: int
type Color7 =
| RGB of { Red: int; Green: int; Blue: int }
| HSL of { Hue: int; Saturation: int; Lightness: int }
// A. Alias
// B. Enum
// C. Record
// D. Record anonyme
// E. Single-case union
// F. Union
// G. Union enum-like
// H. TupleRéponses
Types
Concepts
Composition de types
Création de nouveaux types ?
❓ Combiner 2 Unions ?
💡 Extension d'un Record
Conclusion
Mis à jour