Nesting Custom Types

Learn to define nested Haskell data types.

Defining nested types

When defining custom types with data, we are not limited to using predefined types in the constructors. We can also nest custom types. ...