Mapa mental
Modules
Contenido del mapa
Modules
Allow code reuse
Import modules using "import <module name>"
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>
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...
- Have functions to operate sets
- Must have a qualified import
- Clash with list and prelude
- They are like a sets in mathematics
- Data.LIst
- The standard library import the prelude module by defect
- A library is composed by modules
Are composed by functions, types and typeclasses
Can make custom modules
- use module <module name> (<functions to add>) where <function derfinion>
Información
- Descripción
- Ingeniería Mapa Mental sobre Modules, creado por ORJUELA GARCIA LUIS HERNANDO el 24/09/2019.
- Creado por
- ORJUELA GARCIA LUIS HERNANDO
- Visitas
- 0
- Valoración
Más sobre Haskell Modules and Libraries