对Discrete Mathematics Using a Computer的第一章Introduction to Haskell进行总结.环境Windows 自定义数据类型 data type definitions 形式如: data Colour = Red | Orange | Yellow | Green | Blue | Violet Colour type包含了Red Orange Yellow Green Blue Violet这些值,这些值是constructor,其开头字母要…
十五. 构造数据类型 ● 构造数据类型概念 Structured data types 构造数据类型 结构体(structure), 联合体/共用体 (union), 枚举类型(enumeration type), 要有意识这三者是数据类型 Union is also like structure, i.e. collection of different data types which are grouped together. Each element in a structure or…