cfoldl ~(F op e) = foldl op e ~(F op e) `zip` ~(F op' e') = F op'' (e,e') where ~(a,a') `op''` b = (a `op` b, a' `op'` b)

Then

and

undefined `zip` f' == F undefined undefined `zip` f' f `zip` undefined == f `zip` F undefined undefined

So, although `undefined`

does not have the form `(F op e)`

, it is equivalent to such a form in the context of `cfoldl`

and of `zip`

, as in the morphism property:

cfoldl (f `zip` f') bs == (cfoldl f bs, cfoldl f' bs)

I’m not sure what to make of this result. Can one always play this lazy pattern trick? I don’t think so, in the case of multiple constructors.

]]>Thanks for catching and pointing out my mistake. I accidentally omitted ⊥, and I agree that my mistake is exactly where you pointed out (“We’ll want some structure ….”).

Perhaps this problem has an easy fix, using lazy pattern matching in definitions like `zipF`

.

`cfoldl (undefined `zip` undefined) bs == (cfoldl undefined bs, cfoldl undefined bs)`

; the former is