GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Modules

ORJUELA GARCIA LUIS HERNANDO Ingeniería Spanisch

Inhalt der Mindmap

Modules

  1. Allow code reuse

  2. Import modules using "import <module name>"

  3. In GHCI you can add modules using ":m + <module name>

    • you can hide functions from the imported module using hiding keyword
    • To avoid namespace collision can add qualified keyword
      • Add an alias using as <alias>
  4. haskell has a standart library

    • A library is composed by modules
      • Data.LIst
        • Is a standard module to work with lists
        • has list functions
          • intersperse
          • Intercalate
          • transpose
          • Concat
          • ConcatMap
          • ETC ...
      • Data.Char
        • It's a standard module to work with characters
        • Has functions
          • isControl
          • isSpace
          • IsMark
          • IsNumber
          • ETC ...
      • Data.Map
        • Association list aslo called Dictionaries
        • Has functions
          • fromLIst
          • Empty
          • insert
          • null
          • Size
          • toList
          • ETC ...
      • Data.Set
        • They are like a sets in mathematics
          • Have functions to operate sets
            • fromList
            • Intersection
            • Difference
            • Union
            • ETC...
        • Must have a qualified import
          • Clash with list and prelude
    • The standard library import the prelude module by defect
  5. Are composed by functions, types and typeclasses

  6. Can make custom modules

    • use module <module name> (<functions to add>) where <function derfinion>

Informationen

Beschreibung
Ingeniería Mindmap am Modules, erstellt von ORJUELA GARCIA LUIS HERNANDO am 24/09/2019.
Aufrufe
0
Bewertung

Mehr zu Haskell Modules and Libraries

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck