A type class that indicates that the type A has a structure that can be
modelled by an Expr[A]. The type class let's us switch between the 2 types,
so that we can both traverse the type A as an Expr and also construct an
A from an Expr[A].
If ce is an instance of Coexpr[A], then ce.coexpr(ce.expr(a)) == a.
A type class that indicates that the type
A
has a structure that can be modelled by anExpr[A]
. The type class let's us switch between the 2 types, so that we can both traverse the typeA
as anExpr
and also construct anA
from anExpr[A]
.If
ce
is an instance ofCoexpr[A]
, then ce.coexpr(ce.expr(a)) == a.