Fix, Free, Cofree
def | embed | project | note |
---|---|---|---|
data Fix f = Fix (f (Fix f )) |
fix | unFix | |
data Free f a = Free (f (Free f a)) | Pure a |
free | unFree not total |
sum |
data Cofree f a = Cofree a (f (Cofree f a) |
cofree not total |
unCofree | product |