Haskell Type Annotations Flashcards
1
Q
takeWhile and dropWhile
A
(a -> Bool) -> [a] -> [a]
2
Q
Ord
A
Gives order
1 < 2 for example.
3
Q
Show
A
Print, essentially.
4
Q
Eq
A
Equal:
1 == 1 for example.
5
Q
Read
A
Allows something to be read as a Int, or [char] for example.
Allows types tp be changed.
6
Q
.
A
(b -> c) -> (a -> b) -> a -> c
7
Q
Foldable
A
Used for fold, etc.
8
Q
Foldl1 / Foldr1
A
Foldable t => (a -> a -> a) -> t a -> a
9
Q
Foldl / Foldr
A
Left = Foldable t => (b -> a -> b) -> b -> t a -> b
Right = Foldable t => (a -> b -> b) -> b -> t a -> b
B is the accumulator
10
Q
zipWith
A
(a -> b -> c) -> [a] -> [b] -> [c]
11
Q
zip
A
[a] -> [b] -> [(a, b)]
12
Q
Fractional
A
13
Q
Integral
A
14
Q
Num
A