Structs in Haskell
Our example demonstrates the use of structs, which are typed collections of fields useful for grouping data together to form records.
To run the program, save the code in a file named Structs.hs
and use:
The output will be:
Now that we can run basic Haskell programs, let’s learn more about the language.