Cofree 也許是非空的
特定
data Maybe a = Just a
| Nothing
我們有
data Cofree Maybe a
= a :< Just (Cofree Maybe a)
| a :< Nothing
這是同構的
data NonEmpty a
= NECons a (NonEmpty a)
| NESingle a
特定
data Maybe a = Just a
| Nothing
我們有
data Cofree Maybe a
= a :< Just (Cofree Maybe a)
| a :< Nothing
這是同構的
data NonEmpty a
= NECons a (NonEmpty a)
| NESingle a