Erik Meijer wrote:

> Zipping lists however is *much* easier expressed using anamorphisms
> or unfold. The reason is that when zipping two lists you are
> co-inductively *constructing* a list, and not so much inductively
> destructing a list. Hence the trick of inductively destructing a
> list that returns a function that inductively destructs the second
> list and build the resulting list of pairs.

Zipping lists is equally easy if your are inductively destructing the
*product* of two lists. One ends up with Fegaras style catas[1].


> Have fun!

Cheers, 
  Laszlo (who already had enough of this kind of fun)

[1] L.Fegaras: Improving Programs which Recurse over Multiple
               Inductive Structures
    (PEPM 1994 or his home page)


Reply via email to