Mind map
Modules

Mind map: Modules in Haskell
Map content
Modules
a collection of
- Functions
- Types
- typeclasses
- related to each other
- typeclasses
- Types
- Functions
Advantages
- reuse of functions
- organization
haskell standard library
- divided into modules
- specific use
- List manipulation
- concurrent progtramming
- a complex number module
- specific use
- divided into modules
syntax
- import <module name>
- in the header
- each in separate rows
- example
- in GHCi
- :m + Data.list
- in Script
- the whole module
- import Data.list
- specific functions
- import Data.List (nub, sort)
- the whole module
- in GHCi
Types
- Data.List
- Intersperse
- intersperse 0 [1,2,3]
- [1,0,2,0,3]
- intersperse 0 [1,2,3]
- Intercalate
- intercalate " " ["A","B","C"]
- "A B C"
- intercalate " " ["A","B","C"]
- Transpose
- concat
- concat ["car","los"]
- "carlos"
- concat ["car","los"]
- concatMap
- applies function and concatenates
- Boolean checks
- and
- apply function to a list
- returns true if everything is true
- apply function to a list
- or
- returns true if the validation of an element is true
- any
- all
- and
- iterate
- applies a function to an element, reapplies it to the result
- splitAt
- splitAt 6 "carlosmarin"
- ("carlos","marin")
- splitAt 6 "carlosmarin"
- takeWhile
- take elements as long as the result is true
- dropWhile
- discard element while the condition is true
- returns a pair of lists
- span
- divides when the predicate is false
- Break
- divides when the predicate is true
- span
- sort
- sorts a list
- group
- group equal elements
- inits
- inits "carlos"
- ["","c","ca","car","carl","carlo","carlos"]
- inits "carlos"
- tails
- tails "casa"
- ["casa","asa","sa","a",""]
- tails "casa"
- Search functions
- isInfixOf
- search for a string in the whole list
- isPrefixOf
- look for a string at the beginning of a list
- isSuffixOf
- Look for a string at the end of a list
- elem
- notElem
- find
- returns the first element that fulfills the predicate
- as a maybe element
- findIndex
- findIndices
- returns the first element that fulfills the predicate
- isInfixOf
- partition
- Take a list and a predicate
- returns a tuple
- the first element fulfills the predicate
- the second element is the rest
- returns a tuple
- Take a list and a predicate
- elemIndex
- returns one index
- elemIndices
- returns multiple index
- lines
- lines "carlos\npuentes"
- ["carlos","puentes"]
- lines "carlos\npuentes"
- unlines
- unlines ["hola","mundo"]
- "hola\nmundo"
- unlines ["hola","mundo"]
- words
- separate lines of text by words
- unwords
- the opposite of words
- delete
- delete the first element that matches
- \\
- removes items from one list in another
- Union
- intersect
- insert
- Intersperse
- Data.char
- Handles characters or lists of these
- check its properties
- functions
- isSpace
- check its properties
- check if a character is a space
- check its properties
- isLower
- lower case
- isUpper
- Upper case
- isAlpha
- isAlphaNum
- isPrim
- isDigit
- isLetter
- isNumber
- isPunctuation
- isSymbol
- isSpace
- Handles characters or lists of these
- Data.map
- Association lists
- used to store key-value pairs
- [(k,v)]
- used to store key-value pairs
- Functions
- fromList
- Empty
- insert
- null
- size
- singleton
- lookup
- member
- Association lists
- Data.set
- working with sets
- functions
- intersection
- fromList
- difference
- union
- null
- size
- member
- empty
- singleton
- insert
- delete
- Data.List
Information
- Description
- Mind Map on Modules, created by PUENTES VIVIESCAS CARLOS ALFREDO on 20/03/2018.
- Created by
- PUENTES VIVIESCAS CARLOS ALFREDO
- Views
- 19
- Rating