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

Mindmap

Modules

PUENTES VIVIESCAS CARLOS ALFREDO Spanisch

Mind map about modules in Haskell: advantages, standard library, syntax and types

Mind map: Modules in Haskell

Inhalt der Mindmap

Modules

  1. a collection of

    • Functions
      • Types
        • typeclasses
          • related to each other
  2. Advantages

    • reuse of functions
    • organization
  3. haskell standard library

    • divided into modules
      • specific use
        • List manipulation
        • concurrent progtramming
        • a complex number module
  4. 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)
  5. Types

    • Data.List
      • Intersperse
        • intersperse 0 [1,2,3]
          • [1,0,2,0,3]
      • Intercalate
        • intercalate " " ["A","B","C"]
          • "A B C"
      • Transpose
      • concat
        • concat ["car","los"]
          • "carlos"
      • concatMap
        • applies function and concatenates
      • Boolean checks
        • and
          • apply function to a list
            • returns true if everything is true
        • or
          • returns true if the validation of an element is true
        • any
        • all
      • iterate
        • applies a function to an element, reapplies it to the result
      • splitAt
        • splitAt 6 "carlosmarin"
          • ("carlos","marin")
      • 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
      • sort
        • sorts a list
      • group
        • group equal elements
      • inits
        • inits "carlos"
          • ["","c","ca","car","carl","carlo","carlos"]
      • tails
        • tails "casa"
          • ["casa","asa","sa","a",""]
      • 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
      • partition
        • Take a list and a predicate
          • returns a tuple
            • the first element fulfills the predicate
            • the second element is the rest
      • elemIndex
        • returns one index
      • elemIndices
        • returns multiple index
      • lines
        • lines "carlos\npuentes"
          • ["carlos","puentes"]
      • unlines
        • unlines ["hola","mundo"]
          • "hola\nmundo"
      • 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
    • Data.char
      • Handles characters or lists of these
        • check its properties
      • functions
        • isSpace
          • check its properties
            • check if a character is a space
        • isLower
          • lower case
        • isUpper
          • Upper case
        • isAlpha
        • isAlphaNum
        • isPrim
        • isDigit
        • isLetter
        • isNumber
        • isPunctuation
        • isSymbol
    • Data.map
      • Association lists
        • used to store key-value pairs
          • [(k,v)]
      • Functions
        • fromList
        • Empty
        • insert
        • null
        • size
        • singleton
        • lookup
        • member
    • Data.set
      • working with sets
      • functions
        • intersection
        • fromList
        • difference
        • union
        • null
        • size
        • member
        • empty
        • singleton
        • insert
        • delete

Informationen

Beschreibung
Mindmap am Modules, erstellt von PUENTES VIVIESCAS CARLOS ALFREDO am 20/03/2018.
Aufrufe
19
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck