Mapa mental
Haskell modules
Conteúdo do mapa
Haskell modules
Collection of functions, types and kinds of related types
- There are other functions like: iterate, splitAt, takeWhile, dropWhile, span, sort, group,
Divide the program code into modules for handling functions
- The fromList function takes an association list (in the form of a list) and returns a map with the same associations.
The haskell library is divided into modules that fulfill a specific function
- The function "OR" is like and, only it returns True if any of the boolean values in a list is True
- The functions of the data.char module are: isControl , isSpace , isLower , isUpper , isAlpha,, isAlphaNum , isPrint, isDigit , isOctDigit , isHexDigit , isLetter , isMark , isNumber , isPunctuation , isSymbol , isSeparator , isAscii , isLatin1 , isAsciiUpper , isAsciiLower
- The function "OR" is like and, only it returns True if any of the boolean values in a list is True
The syntax for importing modules in haskell is import <module name>
- Function "and" takes a list of boolean values and returns True only if all the values in the list are True
Import data.List (nub, sort) is used to import specific functions of a module
- The Prelude module exports some functions from Data.List
- The function intersperse takes an element and a list and then puts that element in between each pair of elements in the list
- The function concat flattens a list of lists into just a list of elements
- The function intersperse takes an element and a list and then puts that element in between each pair of elements in the list
- The Prelude module exports some functions from Data.List
To make an exception of a library we use import Data.List hiding (nub)
The Data.List module is all about lists,
data.char exports functions that deal with characters, this functions take a character and tell us whether some assumption about it is true or false.
Data.Map are lists that are used to store key-value pairs where ordering doesn't
- insert takes a key, a value and a map and returns a new map that's just like the old one, only with the key and value inserted.
- null checks if a map is empty
- size reports the size of a map
- singleton takes a key and a value and creates a map that has exactly one mapping.
- member is a predicate takes a key and a map and reports whether the key is in the map or not.
- insert takes a key, a value and a map and returns a new map that's just like the old one, only with the key and value inserted.
empty represents an empty map. It takes no arguments, it just returns an empty map.
The Data.Set module offers operations with mathematical sets as Checking for membership, inserting, deleting, etc
Informações
- Descrição
- Mapa Mental sobre Haskell modules, criado por WILMER ALBERTO GONZALEZ MACHUCA em 13-03-2019.
- Criado por
- WILMER ALBERTO GONZALEZ MACHUCA
- Visualizações
- 0
- Avaliação