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

Mindmap

Haskell

prxd33 Functional Programming Englisch

Inhalt der Mindmap

Haskell

  1. Commands

    • :set +t
      • Report types
    • ghci
      • Run compiler in interactive mode
    • let
      • Definition in local scope
    • :load :r
      • load and reload
    • show
      • Turns showable values into strings
  2. Lazy

    • Does least work to get answer
  3. Polymorphism

    • a
      • Allow any type of input
      • Items in list must be same type
  4. Type classes

    • Integral
      • Int or integer
    • Fractional
      • Floating point or double
    • Ord
      • Any type compared with <
  5. Functions

    • Higher Order Function
      • Function that takes another function as input
    • Recursive Functions
      • Functions defined in terms of themselves
    • Identity function
      • Works on finite lists
      • Returns same value, e.g. reverse . reverse
  6. Syntax

    • Curried Notation
      • curried: a -> b -> c uncurried: (a, b) -> c
      • Turns multiple arguments into 1 -returns function
      • All functions in Haskell are curried
      • Allows partial application
        • Passing less than the full number of arguments
          • Doesn't have to be defined over empty lists
    • Lambda Abstractions
      • Function without a name
      • Allows creation of functions on the fly
      • Good for simple calculations like 2^x
        • map (\x -> 2^x) [1..20]
    • Function definitions
      • Pattern Matching
        • safeTail [ ] = [ ] safeTail (_:xs) = xs
      • Conditional
        • safeTail xs = if null xs then [ ] else drop 1 xs
      • Guarded
        • safeTail xs | null xs = [ ] | otherwise = drop 1 xs

Informationen

Beschreibung
Functional Programming Mindmap am Haskell, erstellt von prxd33 am 11/04/2014.
Erstellt von
prxd33
Aufrufe
14
Bewertung

Mehr zu Functional Programming and Haskell

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck