ЛЛ
Size: a a a
ЛЛ
G
AK
AK
AK
G
AK
AK
G
AP
AO
I
I
AO
interface CanBeAnInt a =
toInt : a -> Int
type AnimalEnum = Cat | Dog
toInt : AnimalEnum -> Int
toInt animal =
case animal of
Cat -> 0
Dog -> 1
addThingsUp : List (CanBeAnInt a) -> Int
addThingsUp things =
List.map toInt >> List.sum