In this recipe, we will work with a set and its APIs. A set is a container that stores unique ordered values.
Working with sets
How to do it...
- Create a new project working-with-set using the simple Stack template:
stack new working-with-set simple
- In the project folder, open the working-with-set.cabal file. Add the new dependency containers in the subsection build-depends of section executable:
executable working-with-set hs-source-dirs: src main-is: Main.lhs default-language: Haskell2010 build-depends: base >= 4.7 && < 5 , Containers
The containers library is a commonly used library that implements...