DK
Size: a a a
DK
K
K
DK
DK
K
type Those a b
= This a
| That b
| Empty
| Both a b
this : a -> Those a b
this = This
that : b -> Those a b
that = That
empty : Those a b
empty = Empty
both : a -> b -> Those a b
both = Both
elim : (a -> c) -> (b -> c) -> c -> (a -> b -> c) -> Those a b -> c
elim unThis unThat unEmpty unBoth those = case those of
This a -> unThis a
That b -> unThat b
Empty -> unEmpty
Both a b -> unBoth a b
— $gen-type Those a b = This a | That b | Empty | Both a b
— gen-type Those a b = This a | That b | Empty | Both a b
K
K
DK
K
_ -> ...
не сделатьK
DK
DK
DK
DK
K
DK
DK
DK