July 2017
Beginner to intermediate
312 pages
7h 21m
English
You’re likely gaining a good sense of types, records, bindings, lists, and optionals. You can build your own type, define functions, and use optional arguments. Let’s continue with a tour of other essential parts of Ludwig’s vocabulary and syntax.
Aside from records, Ludwig provides sum types so that you can create custom types to hold information. In fact, many of the types in the Fugue libraries that you use to compose infrastructure are sum types. See The Etymology of Sum Types, for thoughts on their origin.
A sum type, also known as an algebraic data type or a variant type, is a common feature of functional programming languages. This might sound a bit scary, but fortunately ...