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

Mindmap

Haskell modules

WILMER ALBERTO GONZALEZ MACHUCA Spanisch

Inhalt der Mindmap

Haskell modules

  1. Collection of functions, types and kinds of related types

    • There are other functions like: iterate, splitAt, takeWhile, dropWhile, span, sort, group,
  2. 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.
  3. 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
  4. 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
  5. 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
  6. To make an exception of a library we use import Data.List hiding (nub)

  7. The Data.List module is all about lists,

  8. 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.

  9. 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.
  10. empty represents an empty map. It takes no arguments, it just returns an empty map.

  11. The Data.Set module offers operations with mathematical sets as Checking for membership, inserting, deleting, etc

Informationen

Beschreibung
Mindmap am Haskell modules, erstellt von WILMER ALBERTO GONZALEZ MACHUCA am 13/03/2019.
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck