Title: Theory / Unimportant / CS / Programming / Haskell / Real world/
Tags: hasNotNewEffectReturnsMeaning FromInstruction computer_to_instruction some_instruction mathToSee fromMath duplicate fromDeuxSens mathToDef duplicateToOtherBook récupéré how type declaration duplicateFromOtherBook automatedNewLineAfterCommaSpace seen_description has_seen_instruction_2

Name: append
Definition: ++

Name: ..
Definition: generer la séquence

Name: list comprehension
Definition: [expression avec variables| var_1 <- list1, ... var_n <- list_n]

Name: Taking \(n\)th element of the list \(l\)
Definition: l !! n

Question: Inequality
Answer: /=

Question: Lexicographic strict order
Answer: <

Q: [...]
A: Does a belongs to the list l
Q: [...].
A: elem a l

Q: [...]
A: Transform binary prefix operation op in infix
Q: [...]
A: `op`

Q: [...]
A: transform the infix operation in a prefix one
Q: [...]
A: (op)

Q: [...].
A: the \(i\)th element contains the \(i\)th element of the first list and of the second list
Q: [...]
A: zip
Q: [...]
A: a list -> b list -> (a,b) list

Q: [...]
A: the \(i\)th element contains f (l!! i) (l !! i)
Q: [...]
A: zipWith f l l'
Q: [...]
A: (a->b->c)->[a] -> [b] -> [c]

Q: [...]
A: boolean negation
Q: [...]
A: not

Q: [...]
A: boolean conjonction
Q: [...]
A: &&

Q: [...]
A: boolean disjunction
Q: [...]
A: ||

Q: [...]
A: the conjunction of all elements
Q: [...]
A: and
Q: [...]
A: [bool]-> bool
Q: [...]
A: [bool]-> bool

Q: [...]
A: the disjunction of all elements
Q: [...]
A: or
Q: [...]
A: [bool]-> bool

Name: putStrLn
Definition: sends a string to the terminal

Name: n<- getLine
Definition: Ask for a string from the user and put it in n

Name: read s :: t
Definition: transform the string s in an element of type t

Name: show n
Definition: transform something in its string representation

Q: [...]:[...] is [...]
A: (.); (b-> c) -> (a-> b) ->a -> c; the composition operator

Q: [...]::[...]. [...]
A: map; (a->b)->[a]-> [b]; Apply the function to all elements of the list

Q: [...]::[...]. [...]
A: foldl; (a->b->a)->a ->[b]->a; Apply the binary function to all elements, from left to right

Q: [...]::[...]. [...]
A: foldr; (a->b->b)->a ->[b]->b; Apply the binary function to all elements, from right to left

Name: derive Show
Definition: dire que le type qu'on définit sera affichable

Name: let functionCas 1= expr1
| functionCas 2=expr2
| functionCas n = exprn
Definition: Definition par cas (exemple entier)

Question: type arbre avec nœud entier
Answer: data tree = Leaf | Node Int Tree Tree

Question: autoriser multi ligne dans ghci
Answer: :set +m

Question: Effacer écran de ghci
Answer: :! clear

Question: Transformer une valeur en texte
Answer: show

Name: transformer un texte en valeur
Definition: read

Name: transformer une valeur en texte
Definition: show

Question: Deriver plusieurs valeurs
Answer: deriving (val1, val2)

Question: Negative function
Answer: (- x) with parenthesis
Page: 4
Chapter: 1

Question: x::y means
Answer: x has the type y
Page: 13
Chapter: 1

Question: «it» is
Answer: the last expression evalued
Page: 13
Chapter: 1

Name: Impure functions
Definition: A function which has (does not have) side effect
Page: 27
Chapter: 1

Question: Haskell's extension is
Answer: .hs.
Page: 28
Chapter: 1

Name: A pattern
Definition: \(x\) (irrefutable) or \(x@\text{pat}\) a variable, it must not occur again in the pattern. It may possibly be required to match another pattern
Page: 52
Section: 3
Context: Haskell
Definition2: [] empty list, (pat1:pat2) pat1 in head, pat2 in tail of the list
Definition3: (pat1,...,pat\(n\)) an \(n\)-tuple of pattern
Definition4: _ wild card pattern (irrefutable)
Definition5: Constructor pattern1 ... pattern\(n\) - An algebraic type with \(n\) parameters

Question: A type with multiple value.
data Name = Constructor{
name1 :: type1,
name2 :: type2
} generates:
Answer: name\(i\) of type
Page: 55
Section: 3

-a - a variable
-Constructor type1 type2
-[t] a list of element of type t
-(t1,t2) an \(n\)-tuple of elements
Chapter: 3
Name: Type
Extra: n ?

Its name is given by: data Name var1 var2 =
Its different kind of constructors are:
- Constructor1 type11 type12
|Constructor2 type21 type22

-Constructor{
name1 : : type1,
name2 : : type2
}

-type
Chapter: 3
Name: Type definition

Name: An irrefutable pattern
Definition: A pattern which matches against everything.
Page: 68
Chapter: 3
Variables: \(p\) a pattern

Name: Total/Partial function
Definition: A function which (does not) return values for all entry.
Page: 79
Chapter: 4

Q: The case where \(f\) [...].
A: calls itself
Page: 87
Chapter: 4
Variables: \(f\) a recursive function
Name: The recursive case
Name2: The inductive case

Name: A high order function
Definition: A function which takes as input a function.
Page: 89
Chapter: 4
Variables: \(f\) a function

Q: [...] represents [...].
A: foo'; a variable related to \(foo\)
Page: 86
Chapter: 4
Variables: foo a variable

Name: Tail recursive function
Definition: A function which returns the result of a call of a function.
Page: 87
Chapter: 4
Variables: \(f\) a recursive function

Name: Currying
Definition: Applying a function to only some of its argument
Page: 102
Chapter: 4

Name: Section of *
Definition: (var *) and (* var).
Page: 102
Chapter: 4
Variables: * an infix function

Name: Strict function
Definition: A function not evaluated lazily.
Page: 108
Chapter: 4
Variables: \(f\) a function

Name: Point free function
Definition: A function definition which does not mention its variable(s).
Page: 120
Chapter: 5

Name: Package
Definition: One library and possibly several executable program
Page: 131
Chapter: 5

Q: Typeclass [...]
Function(s): [...]
A: Show; show:transform a value in string
Page: 140
Chapter: 6

Q: Typeclass [...]
Function(s): [...]
A: Read; read: transform a string with a value. Its type must often be explicitly state
Page: 141
Chapter: 6

Name: Serialization
Definition: Storing data structure on the disk in order to be able to read it later
Page: 143
Chapter: 6

Question: Difference between data and newtype:
Answer: At runtime, the constructor of newtype does not exists, hence considering the runing time and space, it can be assumed that it is similar to using the oldType.
Page: 157
Chapter: 6

Question: IO functions with files is
Answer: similar to IO on screen, with an additional h (for handle) before the name of the function
Page: 169
Chapter: 7

Instruction: "Name/of/a/file"
Page: 171
Language: Haskell
Chapter: 7
Typ: FilePath

Instruction: mapM_ fun traversable
Page: 185
Effect: Apply the function to each elements of traversable
Language: Haskell
Chapter: 7
Returns: m ()
Typ: (Monad m, Traversable t) => (a -> m b) -> t a -> m ()
Example: `mapM_ print` prints the list of elements

ByteString should be lazy if huge data must be processed linearly and not lazy if cache is not a problem or there is a need for random access
Page: 194
Chapter: 8

Q: [...] in module [...]
A: Word8; Data.Word
Page: 195
Chapter: 8
Name: The type for representing bytes

Q: [...] in module [...]
A: Char8; Data.ByteString.(Lazy.)Char8
Page: 195
Chapter: 8
Name: The type of ByteString whose elements are Char

Instruction: :?
Page: 3
Effect: Print help
Language: Haskell
Chapter: 1

Instruction: :set prompt "foo"
Page: 3
Effect: Set the prompt to "foo"
Language: Haskell
Chapter: 1

Instruction: ( f )
Page: 4
Effect: Transform infix f into prefix
Language: Haskell
Chapter: 1
Variables: f an infix binary function

Instruction: True, False
Page: 5
Effect: Boolean constants
Language: Haskell
Chapter: 1
Typ: Bool

Instruction: &&, ||, not
Page: 005
Effect: Boolean conjunction, disjunction, negation
Language: Haskell
Chapter: 1
Typ: Bool -> Bool -> Bool, Bool -> Bool -> Bool, Bool -> Bool

Instruction: ==
Page: 6
Effect: Equality of elements of the same type
Language: Haskell
Chapter: 1
Typ: Eq a => a -> a -> Bool

Instruction: <, <=, >, >=
Page: 6
Language: Haskell
Chapter: 1
Returns: less than, less than or equal to, greater than, greater than or equal to
Typ: Ord a => a -> a -> Bool

Instruction: :info
Page: 7
Effect: Giving information about the argument
Language: Haskell
Chapter: 1

Instruction: foo arg1 ... argn
Page: 8
Effect: (...(foo arg1) ...) argn
Language: Haskell
Chapter: 1
Intuition: Application of foo to args arg1 ... argn

Instruction: let var=expr
Page: 8
Language: Haskell
Chapter: 1
Identifier: var
Initialization: expr's value
Mutable: no

Instruction: **
Page: 8
Effect: Exponential by a float
Language: Haskell
Chapter: 1
Typ: Floating a => a -> a -> a

Instruction: ^
Page: 8
Effect: Exponential by an integral
Language: Haskell
Chapter: 1
Typ: (Num a, Integral b) => a -> b -> a

Instruction: [val_1, ..., val_n] (where ... actually should be explicit value)
Page: 8
Effect: Creating list with val_1, ..., val_n with same distance between elements
Language: Haskell
Chapter: 1
Variables: val__i of type t_i
Assuming: All t_i's are equal
Typ: [t_i]

Instruction: [val_1, val_2 .. val_n] (where .. actually appears in the code)
Page: 10
Effect: Creating list with val_1, val_2, up to val_n with same distance between elements
Language: Haskell
Chapter: 1
Variables: val_i: t_i
Assuming: All t_i's are equal
Typ: [t_i]

Instruction: [val_1 .. val_n] with .. actually in the code
Page: 10
Effect: Creating list with val_1,up to val_n with distance one betwen elements
Language: Haskell
Chapter: 1
Variables: val_i:Enum
Extra: Checked
Typ: typeOfval_i list

Instruction: [val_1, val_2 ..] where .. occurs in the code
Page: 10
Effect: Creating a list starting with val_1, val_2 with same distance between all elements until maximal element if it exists
Language: Haskell
Chapter: 1
Variables: val_i of type Enum
Typ: typeOfval_i list

Instruction: [val_1 ..] where ".." occurs in the code
Page: 10
Effect: Creating list with val_1, up to infty, with distance 1 between successive elements
Language: Haskell
Chapter: 1
Variables: val_1 : Enum
Typ: typeOfval_i list

Instruction: append (prefix)
Page: 11
Effect: Concatenation of 2 lists
Language: Haskell
Chapter: 1
Abbreviation: ++ (infix)
Typ: [a] -> [a] -> [a]
Library: Data.list for append

Instruction: foo : bar
Page: 11
Language: Haskell
Chapter: 1
Returns: The list whose head is foo and tail is bar
Typ: a -> [a] -> [a]

Instruction: \n
Page: 11
Effect: newline
Language: Haskell
Chapter: 1

Instruction: \t
Page: 11
Effect: tab
Language: Haskell
Chapter: 1

Instruction: putStrLn
Page: 12
Effect: print a string
Language: Haskell
Chapter: 1
Typ: String -> IO ()

Instruction: "foo"
Page: 12
Effect: The string containing «foo»
Language: Haskell
Chapter: 1
Typ: String

Instruction: 'a'
Page: 12
Effect: The letter «a»
Language: Haskell
Chapter: 1
Typ: Char

Instruction: Integer
Page: 21
Effect: Unbounded ints
Language: Haskell
Chapter: 2

Instruction: Double
Page: 21
Effect: the native floating point representation
Language: Haskell
Chapter: 2

Instruction: tail
Page: 23
Effect: The input without its first element if it exists. Exception Prelude.tail otherwise
Language: Haskell
Chapter: 2
Typ: [a]->[a]

Instruction: head
Page: 23
Effect: The first element if it exists. exception Prelude.head otherwise
Language: Haskell
Chapter: 2
Typ: [a]->a

Instruction: (
  val_1,
  ...,
  val_n
)
Page: 24
Language: Haskell
Chapter: 2
Returns: An object with n values, equal to the interpretation of each val_i
Typ: (
  type_1,...,
  type_2
)
Name: Tuple of elements

Instruction: ()
Page: 25
Effect: type with a single element called unit
Language: Haskell
Chapter: 2

Instruction: take n l
Page: 26
Language: Haskell
Chapter: 2
Returns: Return the n first elements of l
Typ: Int -> [a] ->[a]

Instruction: drop n l
Page: 26
Language: Haskell
Chapter: 2
Returns: the list without its n first elements
Typ: Int -> [a] ->[a]

Instruction: fst pair
Page: 26
Language: Haskell
Chapter: 2
Returns: The first element of the pair
Typ: (a,b)->a

Instruction: snd
Page: 26
Language: Haskell
Chapter: 2
Returns: The second element of a pair
Typ: (a,b)->b

Instruction: lines input
Page: 27
Language: Haskell
Chapter: 2
Returns: the list of lines input splitted on \n
Typ: String-> [String]

Instruction: :load file
Page: 28
Effect: Load the file and compile it
Language: Haskell
Context: Interpreter
Chapter: 2
Abbreviation: :l file

Instruction: fun param1 param2
Page: 28
Effect: definitions of function with 2 parameters
Language: Haskell
Chapter: 2

Instruction: if cond then val_1 else val_2
Page: 30
Effect: If cond is true then val_1 else val_2
Language: Haskell
Chapter: 2
Variables: cond : bool
val_i of type t_i
Assuming: t_1=t_2
Typ: t_i

Instruction: mod
Page: 32
Effect: modular predicate
Language: Haskell
Chapter: 2
Typ: Integral a=> a->a->a

Instruction: thunk
Page: 32
Effect: A record to track an unevaluated expression
Language: Haskell
Chapter: 2

Instruction: FunctionName pattern_1
   |gard_1= code_11
   |gard_2= code_12
   |otherwise=code_13
FunctionName pattern_2= code_2
Page: 50, 68
Effect: A definition by case, testing each pattern in the defined order.
If a pattern is found, testing each guard until one holds. If none holds, otherwise is chosen, or the next pattern.
Language: Haskell
Chapter: 68
Section: 3
Variables: gard_i of type Bool,
pattern_i of type t_i
code_ij of type t'_ij
Assuming: all t_i's are equal,
all t_ij's are equal,
Typ: t_i => t'_ij

Instruction: product
Page: 51
Effect: The product of the elements of the argument
Language: Haskell
Chapter: 3
Typ: (Foldable t, Num a) => t a -> a

Instruction: sum
Page: 51
Effect: The sum of the elements of the argument
Language: Haskell
Chapter: 3
Typ: (Foldable t, Num a) => t a -> a

Instruction: error
Page: 60
Effect: Stop the program and print the error message
Language: Haskell
Chapter: 3
Typ: String -> a

Instruction: Nothing | Some a
Page: 61
Effect: A constructor for potential value
Language: Haskell
Chapter: 3
Typ: Maybe a

Instruction: let var1 = val1
     var2 = val2
in code
Page: 62
Meaning: Introduce local variables
Language: Haskell
Chapter: 3
Identifier: var1 var2
Typ: typeOfCode

Instruction: let var = code
where var_1 = val_1
var_2 = val_2
Page: 63
Meaning: Introduce local variables after the definition
Language: Haskell
Chapter: 3
Typ: typeOfCode

Instruction: case val of
pattern_1 -> val_1
...
pattern_n -> val_n
Page: 67
Effect: Check val against the pattern
Language: Haskell
Chapter: 3
Returns: the first vali, all have the same type such that pattern_i corresponds
Variables: val_i, all have the same type
Typ: type of val_i

Instruction: break
Page: 75
Effect: split the list on the first element satisfying the boolean function. This element appears as the head of the second list.
Language: Haskell
Chapter: 4
Typ: (a-> Bool)->[a] -> ([a],[a])

Instruction: id
Page: 75
Effect: identity function
Language: Haskell
Chapter: 4
Typ: a->a

Instruction: unline
Page: 75
Effect: Transform a list of lines into a string with new lines
Language: Haskell
Chapter: 4
Typ: [String]->String

Instruction: `foo` (backquotes)
Page: 76
Effect: foo becomes infix
Language: Haskell
Chapter: 4

Instruction: :module +foo
Page: 77
Effect: Load the module foo in Ghci
Language: Haskell
Chapter: 4

Instruction: length
Page: 78
Effect: the length of the set
Language: Haskell
Chapter: 4
Typ: Foldable t => t a -> Int

Instruction: last
Page: 78
Effect: The last element of the list
Language: Haskell
Chapter: 4
Typ: [a]->a

Instruction: init
Page: 78
Effect: The entire list without its last element.
Language: Haskell
Chapter: 4
Typ: [a]->[a]

Instruction: concat
Page: 80
Effect: Append the lists of the set of list
Language: Haskell
Chapter: 4
Typ: Foldable t => t [a]->[a]

Instruction: reverse
Page: 80
Effect: reverse the list
Language: Haskell
Chapter: 4
Typ: [a]->[a]

Instruction: all
Page: 81
Effect: True iff the boolean property holds on each element of the set
Language: Haskell
Chapter: 4
Typ: Foldable t => (a -> Bool) -> t a -> Bool

Instruction: any
Page: 81
Effect: True iff the boolean property holds on some element of the set
Language: Haskell
Chapter: 4
Typ: Foldable t => (a -> Bool) -> t a -> Bool

Instruction: splitAt
Page: 81
Language: Haskell
Chapter: 4
Returns: The k first elements, and the list without its k first elements
Typ: Int -> [a] -> ([a], [a])

Instruction: takeWhile
Page: 81
Language: Haskell
Chapter: 4
Returns: The longest prefix of the list satisfying the boolean predicate
Typ: (a-> Bool)-> [a]->[a]

Instruction: dropWhile
Page: 82
Language: Haskell
Chapter: 4
Returns: The list without its longest prefix of the list satisfying the boolean predicate
Typ: (a-> Bool)-> [a]->[a]

Instruction: span
Page: 82
Language: Haskell
Chapter: 4
Returns: The pair takeWhile, dropWhile
Typ: (a-> Bool)-> [a]->([a],[a])

Instruction: elem
Page: 82
Effect: True if the element belongs to the list
Language: Haskell
Chapter: 4
Typ: (Foldable t, Eq a) => a -> t a -> Bool

Instruction: notElem
Page: 82
Effect: True if the element does not belong to the list
Language: Haskell
Chapter: 4
Typ: (Foldable t, Eq a) => a -> t a -> Bool

Instruction: filter
Page: 82
Language: Haskell
Chapter: 4
Returns: the list with only the elements satisfying the predicate
Typ: (a -> Bool) -> [a] -> [a]

Instruction: even n
Page: 82
Language: Haskell
Chapter: 4
Returns: whether n is even
Typ: Integral a => a -> Bool

Instruction: odd n
Page: 82
Language: Haskell
Chapter: 4
Returns: whether n is odd
Typ: Integral a => a -> Bool

Instruction: isPrefixOf
Page: 83
Language: Haskell
Chapter: 4
Returns: Whether the first argument is a prefix of the second one
Typ: Eq a => [a] -> [a] -> Bool

Instruction: isSuffixOf
Page: 83
Language: Haskell
Chapter: 4
Returns: Whether the first argument is a suffix of the second one
Typ: Eq a => [a] -> [a] -> Bool

Instruction: isInfixOf
Page: 83
Language: Haskell
Chapter: 4
Returns: Whether the first argument is a sublist of the second one
Typ: Eq a => [a] -> [a] -> Bool

Instruction: zip (
  zip 3,
  ... zip7
)
Page: 83
Language: Haskell
Chapter: 4
Returns: The list whose \(  i\)-th element is the pair of the \(  i\)-th element of the 2 input lists, for \(  i\) less than the length of both lists.
Typ: [a] -> [b] -> [(
  a,
  b
)]

Instruction: zipWith, zipWith3, ... zipWith7
Page: 83
Language: Haskell
Chapter: 4
Returns: The list whose \(i\)-th element is the function, applied to the pair of the \(i\)-th element of the 2 input lists, for \(i\) less than the length of both lists.
Typ: (a->b->c) -> [a] -> [b] -> [c]

Instruction: map f l
Page: 89
Language: Haskell
Chapter: 4
Returns: The list with the function f applied to each elements of l
Typ: (a->b)->[a]->[b]

Instruction: shiftL
Page: 91
Effect: Shift the input to the left
Language: Haskell
Chapter: 4
Typ: Bits a=> a->Int ->a
Library: Data.Bits

Instruction: .&.
Page: 91
Effect: bitwise and
Language: Haskell
Chapter: 4
Typ: Bits a=> a->a ->a
Library: Data.Bits

Instruction: .|.
Page: 91
Effect: bitwise or
Language: Haskell
Chapter: 4
Typ: Bits a=> a->a ->a
Library: Data.Bits

Instruction: foldl
Page: 92
Effect: Apply the function from the left to the right, with the second argument as initial value
Language: Haskell
Chapter: 4
Typ: Foldable t => (b -> a -> b) -> b -> t a -> b

Instruction: foldr
Page: 92
Effect: Apply the function from the right to the left, with the second argument as initial value
Language: Haskell
Chapter: 4
Typ: Foldable t => (a -> b -> b) -> b -> t a -> b

Instruction: (\ var -> expr)
Page: 99
Effect: Anonymous function sending var to expr.
Language: Haskell
Chapter: 4
Typ: a-> (typeOfvar, with var of type a)

Instruction: tails
Page: 103
Language: Haskell
Chapter: 4
Returns: The list of suffix
Typ: [a]->[[a]]

Instruction: . (as an infix operator)
Page: 105
Effect: Composition of function
Language: Haskell
Chapter: 4
Typ: (b -> c) -> (a -> b) -> a -> c

Instruction: words
Page: 105
Effect: Separate a string into its list of words
Language: Haskell
Chapter: 4
Typ: String -> [String]

Instruction: isUpper input
Page: 105
Language: Haskell
Chapter: 4
Returns: Whether input is in upper case
Typ: Char -> Bool

Instruction: foldl'
Page: 97
Effect: As foldl, but without stack overflow
Language: Haskell
Chapter: 4

Instruction: seq
Page: 108
Effect: Evaluates the first argument. Halting to the evaluation of the first constructor
Language: Haskell
Chapter: 4
Returns: Value of second argument
Typ: a->t->t

Instruction: import moduleName (
  typeOne,TypeTwo,... ,
  valueOne,ValueTwo...
)
Page: 124
Effect: Import the types and values from the module name (default, all)
Language: Haskell
Chapter: 5

Instruction: undefined
Page: 18, 119
Effect: A value which is a placeholder for anything/bottom for any type
Language: Haskell
Chapter: 5, 2
Section: , 3
Typ: a

Instruction: class ClassName typeOne typeTwo ... where
functionNameOne::typeOne
functionNameTwo::typeTwo
Page: 136
Effect: Declaring a typeclass
Language: Haskell
Chapter: 6

Instruction: instance ClassName TypeName where
ClassFunction1 = ...
ClassFunction2 = ...
...
Page: 137
Effect: State that the concrete type TypeName belongs to the typeclass ClassName and give the value associated to each name of the class
Language: Haskell
Chapter: 6
Extra: duplicate

Instruction: Show
Page: 140
Effect: Transform a value to string
Language: Haskell
Chapter: 6
Where to use it: standard typeclass

Instruction: Left valueA
Right valueB
Page: 151
Effect: A type with two possible types of values
Language: Haskell
Chapter: 6
Typ: Either a b

Instruction: instance NameType NameTypeClass where
varOne = valueOne
...
Page: 152
Meaning: State that NameType belongs to NameTypeClass, and that the var_i value of this class is value_i.
Language: Haskell
Chapter: 6
Extra: duplicate

Instruction: newtype NewTypeName = ConstructorName OldType
deriving (TypeClassOne,...)
Page: 156
Meaning: Creating a type using an old type. The type system do not know that both type are equal
Language: Haskell
Chapter: 6
Identifier: NewTypeName
Index: paramètre ?

Typ: IO t
Meaning: Something which, when evaluated, may have possible input/output/side effect, and return an element of type t
Page: 165
Language: Haskell
Chapter: 7
Name: An I/O action

Instruction: getLine
Page: 165
Effect: Ask the user for a string
Language: Haskell
Chapter: 7
Typ: IO String

Instruction: varName <- action
Page: 165
Effect: Put the result of the action in varName
Language: Haskell
Chapter: 7
Typ: (Monad m)=> (m a) -> a

Instruction: do
  action_1
_   ...
  action_n
Page: 167
Effect: execute the \(n\) actions action_i
Language: Haskell
Chapter: 7
Returns: value of action_n

Instruction: return
Page: 170
Effect: Transform an abritrary value into one usable in this particular monad
Language: Haskell
Chapter: 7
Typ: Monad m => a -> m a

Instruction: openFile
Page: 171
Effect: Open a file
Language: Haskell
Chapter: 7
Typ: FilePath->IOMode -> IO Handle

Instruction: hTell
Page: 172
Language: Haskell
Chapter: 7
Returns: The current place in the file
Typ: Handle -> IO Integer

Instruction: hSeek
Page: 172
Effect: Change the place in the file
Language: Haskell
Chapter: 7
Typ: Handle -> SeekMode -> Integer -> IO ()

Instruction: openTempFile
Page: 174
Effect: Open a file which is garanteed to be unique
Language: Haskell
Chapter: 7
Typ: FilePath -> String -> IO (FilePath, Handle)

Instruction: readFile file
Page: 180
Language: Haskell
Chapter: 7
Returns: content of file as a single String
Typ: FilePath->IO String

Instruction: writeFile
Page: 180
Effect: Consider a file as a string to write
Language: Haskell
Chapter: 7
Typ: FilePath->String-> IO()

Instruction: interact
Page: 181
Effect: Takes text on standard input, apply the function, output on standard output
Language: Haskell
Chapter: 7
Typ: (String -> string) -> IO ()

Instruction: mapM fun traversable
Page: 185
Language: Haskell
Chapter: 7
Returns: result of applying the function to each element of the traversable
Typ: (Monad m, Traversable t) => (a -> m b) -> t a -> m (t b)

Instruction: >>
Page: 186
Effect: Perform the first action, and then the second one
Language: Haskell
Chapter: 7
Typ: Monad m => m a -> m b -> m b

Instruction: System.Environment.getArgs
Page: 190
Effect: The list of arguments
Language: Haskell
Chapter: 7
Typ: IO [String]

Instruction: System.Environment.getProgName
Page: 190
Effect: The name of the program called
Language: Haskell
Chapter: 7
Typ: IO String

Instruction: import qualified moduleName as L
Page: 194
Effect: Import moduleName which can now be referred as L
Language: Haskell
Chapter: 8

Instruction: import qualified moduleName
Page: 194
Effect: Import moduleName (but
Language: Haskell
Chapter: 8

Instruction: Transform a list of bytes into a ByteString
Page: 195
Effect: pack
Language: Haskell
Chapter: 8
Typ: [GHC.Word.Word8] -> Data.ByteString.(Lazy).ByteString
Library: Data.ByteString(.Lazy)

Instruction: Transform a ByteString into a list of bytes
Page: 195
Effect: unpack
Language: Haskell
Chapter: 8
Typ: Data.ByteString.(Lazy).ByteString -> [GHC.Word.Word8]
Library: Data.ByteString(.Lazy)

Instruction: empty
Page: 196
Effect: The empty ByteString
Language: Haskell
Chapter: 8

Instruction: minimum
Page: 196
Language: Haskell
Chapter: 8
Returns: the minimal element of a set
Typ: (Ord a, Foldable t) => t a -> a

Instruction: maximum
Page: 196
Language: Haskell
Chapter: 8
Returns: the maximal element of a set
Typ: (Ord a, Foldable t) => t a -> a

Instruction: =~
Page: 199
Effect: Match a string against a regex
Language: Haskell
Chapter: 8
Returns: a lot of information, depending of the type

Instruction: handle
Page: 209
Effect: Takes a function which deals with the exception, an action which may throw the exception, and return either the result of the action if it does not throw an exception, or the function applied to the exception otherwise
Language: Haskell
Chapter: 8
Typ: (Exception -> IO a) -> IO a -> IO a
Library: Control.Exception

Instruction: const value
Page: 209
Language: haskell
Chapter: 8
Returns: A unary function, always returning value
Typ: 'a -> valueType

Instruction: forM
Page: 214
Effect: Takes a list, a function from elements to monad, apply the function to each elements of the list
Language: Haskell
Chapter: 9
Typ: (Monad m) => [a] -> (a-> mb) -> m [b]

Instruction: filterM
Page: 219
Effect: Filter, but using monad Booleans
Language: Haskell
Chapter: 9
Typ: (Monad m) => (a-> m Bool) -> [a] -> m [a]

Instruction: bracket a b c
Page: 221
Effect: Apply a,
apply b,
apply c even if an exception occured.
Language: Haskell
Chapter: 9
Returns: the value returned by a
Typ: IO a => (a -> IO b) -> (a -> IO c) -> IO c
Library: IO
Exception: Control.Exception
throw the exception thrown by a

Smaller0: variable
Greater0: it starts by a lowercase
Page: 37
Chapter: 1
Variables: \(t\) a type name
Smaller to greater: iff
Hide middle: yes
Prefix Smaller: \(t\) is

Instruction: module foo (
  typ1(constructor11, ..., constructor1m_1),
  ...,
  typn( ...),
  foo1,
  ...,
  foor
) where
,
  with the name being the name of the file,
  and the values being type or object declared after the where.
Page: 113
Effect: Declaring a module, named name, exporting types typei, with its constructors constructorij (use .. for all constructors) and values fooi
Language: Haskell
Chapter: 5
Assuming: Values are:
«Type (
  ..
)» to state that we export all constructors.

Name: The base case
Definition: The case where \(f\) doesn't calls itself.
Page: 87
Chapter: 4
Variables: \(f\) a recursive function
Name2: The nonrecursive case

Instruction: unsafeCoerce
Page: 15
Effect: Identity function on arbitrary type
Language: Haskell
Chapter: 2

Name: Type inference
Definition: Program which guess type of a term
Page: 15
Chapter: 2

Name: Type
Page: 16
Chapter: 2
Section: 3
Intuition: A set of value

Typ: String
Meaning: List of Char
Page: 16
Language: Haskell
Chapter: 2
Section: 3

Instruction: foo::bar
Page: 16
Effect: foo is of type bar
Language: Haskell
Chapter: 2
Section: 3

Typ: Int
Meaning: The hardware's integers
Page: 17
Language: Haskell
Chapter: 2
Section: 3

Objects: Sets
Arrows: Functions
Page: 17
Chapter: 2
Section: 3
Name: Set

Instruction: \(\bot\) or _|_
Page: 18
Effect: Represents a non-terminating computation
Language: Haskell
Chapter: 2
Section: 3
Name: Bottom

Objects: Set
Arrows: functions from \(A\to B\cup\{\bot\}\)
Page: 18
Chapter: 2
Section: 3
Name: Hask

Instruction: product foo
Page: 20
Effect: The products of elements of the list foo
Language: Haskell
Chapter: 2
Section: 4

Name: Mathematical function
Definition: Mapping from value to value
Page: 22
Chapter: 2
Section: 5

Name: Pure function
Definition: Function always produce the same result given the same input and have no side effects
Page: 22
Chapter: 2
Section: 5

Typ: Void
Meaning: Inhabited type
Page: 22
Language: Haskell
Chapter: 2
Section: 6

Instruction: absurd
Page: 22
Effect: function of type Void -> a
Language: Haskell
Chapter: 2
Section: 6

Typ: Void
Meaning: Type with a single value
Page: 23
Language: Haskell
Chapter: 2
Section: 6

Typ: ()
Meaning: Type with a single value
Page: 23
Language: Haskell
Chapter: 2
Section: 6

Instruction: ()
Page: 24
Effect: Only value of type ()
Language: Haskell
Chapter: 2
Section: 6
Intuition: Unit

Instruction: _
Page: 24
Effect: Placeholder for a discarded argument
Language: Haskell
Chapter: 2
Section: 6

Name: parametrically polymorphic function
Definition: Functions that can be implemented with the same formula for any type
Page: 25
Chapter: 2
Section: 6
Extra: generic ?

Typ: Bool
Meaning: Type with two elements True and False
Page: 25
Language: Haskell
Chapter: 2
Section: 6

Name: Predicate
Definition: Function whose range is Bool
Page: 26
Chapter: 2
Section: 6

Name: Memoize
Definition: Recording the value returned by a function to avoid computing it again
Page: 27
Chapter: 2
Section: 7