GoConqr has a new look! Let us know what you think.

Mind map

starting out

Diego Alvarez Informática English

Map content

starting out

  1. infix functions

    • 5*5
    • 5/5
    • 5+5
    • 5-5
    • explicit precedence: ()
    • function has the higher precedence
  2. prefix functions

    • as infix function
      • 92 `div` 10
    • calling
      • name argument argument
        • succ 8
        • max 6.0 7.5
        • min 5 6
    • creating
      • functionName [parameters..] = <what the function does>
        • doubleUs x y = x*2 + y*2
          • doubleUs 4 9
          • different version?
            • doubleUs'
        • No parameters?
          • name || definition
      • Is their order important in .hs file?
        • No
  3. boolean algebra

    • &&
    • ||
    • not
    • True
    • False
  4. in(equality)

    • ==
    • /=
  5. expression

    • a piece of code that returns a value
      • like
        • if statement
          • if <condicion> then <..> else <..>
            • else is mandatory
              • so, makes the if an expression
  6. List

    • [1,2, 3]
    • homogenous data structure
    • Strings
      • ['h', 'a', 's']
    • [3,4,5]
    • concatenation
      • ++
        • [1,2,3] ++ [4,5,6]
    • add element at head ?
      • 0 : [1,2,3]
        • [0,1,2,3]
    • [[],[],[]]
      • must be of equal type!!
    • need at element?
      • [] !! <index>
    • are comparable in lexicographical order.
      • [3,2,1] > [2,1,0]
        • True
    • Ranges
      • [1..5]
      • ['a'..'z']
      • with steps
        • [2,4..20]
        • [20,19..1].
        • [13,26..24*13]
      • works well with float-point?
        • No, precision-lost
    • Common functions
      • head
    • infinite?
      • cycle
      • repeat
    • comprehensions
      • [x*2 | x <- [1..10]
        • with predicates || filtering
          • [x*2 | x <- [1..10], x*2 >= 12]
      • like in math
        • S = {2X | x E N, x <= 10}
    • of
      • should be of equal size
        • [(1,2),(8,11,5),(4,5)]
          • Error!!
  7. Tuples

    • pair
      • (1,2)
    • heterogenous data structure
    • triple
      • (1,"Two",3)
    • some functions
      • fst
        • fst (1,2)
          • 1
      • snd
        • snd (1,2)
          • 2
      • zip
        • zip [1,2] [3,4]
          • [(1,3), (2,4)]

Information

Description
Informática Mind Map on starting out, created by Diego Alvarez on 27/02/2018.
Created by
Diego Alvarez
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?