Consider the simple cons-list datatype. import scalaz.Equal, scalaz.std.option._, scalaz.syntax.std.option._, scalaz.std.anyVal._, scalaz.std.function._, scala.reflect.runtime.universe.reify sealed abstract class XList[A] final case class XNil[A]() extends XList[A] final case class XCons[A](head: A, tail: XList[A]) extends XList[A] And a simple function over this structure. Say, a simple summing function. def sum(xs: XList[Int]): Int = xs match { case XNil() => 0 case XCons(x, xs) => x + sum(...