Classes Flashcards

1
Q

Eq

A

equality types:

types whose values can be compared for equality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Ord

A
ordered types:
class contains types of the Eq whose values are totally ordered
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Show

A

showable types :

types whose values can be converted into strings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Read

A

readable types:

dual to Show, contains types whose values can be converted from strings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Num

A

numeric types have values which are numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integral

A

contains instances of the numeric class Num whose values are integer and support integer division and integer remainder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Fractional

A

contains instances of the numeric class Num whose values are not Integral and support fractional division and remainder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the Eq methods?

A

(==) :: a -> a -> Bool

(/=) :: a -> a -> Bool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the Ord methods?

A
( a-> Bool
(<=) :: a-> a-> Bool
(>) :: a-> a-> Bool
(>=) :: a-> a-> Bool
min :: a-> a-> a
max :: a-> a-> a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the Show methods?

A

show :: a-> String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the Read methods?

A

read :: String -> a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the Num methods?

A
(+) :: a -> a -> a
(-) :: a -> a -> a
(*) :: a -> a -> a
negate :: a -> a 
abs :: a -> a
signum:: a -> a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the Integral methods?

A

div :: a-> a-> a

mod :: a-> a-> a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the Fractional methods?

A

(/) :: a -> a-> a

recip :: a -> a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly