¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Modules

sixto alberto becerra reslen Español

Contenido del mapa

Modules

  1. are a collection of related functions, types and typeclasses

    • in the same way, a Haskell program is a collection of modules.
  2. There's a module for manipulating lists, a module for concurrent programming, a module for dealing with complex numbers, etc

  3. The syntax for importing modules in a Haskell script is: import <module name>.

    • Data.List
      • It provides some very useful functions for dealing with list.
        • intersperse, intercalate, transpose, concat, elemIndex ...
          • function we could find once we import Data.List
    • Data.Char
      • functions that deal with characters. It's also helpful when filtering and mapping over strings because they're just lists of characters
        • isControl, isSpace, isLower, isUpper, isAlpha, isAlphaNum, isDigit ...
          • function we could find once we import Data.Char
    • Data.Map
      • are lists that are used to store key-value pairs where ordering doesn't matter.
        • fromList , empty, insert , null, size, singleton, lookup ...
          • function we could find once we import Data.Map
    • sometimes function shared common functions
      • to solve this we make the import qualified asigning a alias for each function
        • import qualified Geometry.Sphere as Sphere
  4. Making our own modules

    • At the beginning of a module, we specify the module name
    • Then, we specify the functions that it exports
      • suroounded by () and each function separated by ,
    • after that, we can start writing the functions
      • after where definition.

Información

Descripción
Mapa Mental sobre Modules, creado por sixto alberto becerra reslen el 27/03/2020.
Visitas
1
Valoración

Más sobre Haskell Modules and Libraries

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?