Effective Haskell: Creating Data Types and Records (Chapter 4 - ePub p 94)

At the end of the subsection on records, it might be nice to mention the practice of defining a default value for a complex record (e.g., for an HTTP request). Many of the fields of the record have sensible defaults and as was shown in the simple example in the text, you can a new record and assign just the values you need to change and the defaults are used for the other fields.

1 Like