[Haskell-cafe] Really need some help understanding a solution

Henning Thielemann lemming at henning-thielemann.de
Fri Mar 27 21:03:48 EDT 2009

On Thu, 26 Mar 2009, wren ng thornton wrote:

> Thomas Hartman wrote:
>> Luke, does your explanation to Guenther have anything to do with
>> coinduction? -- the property that a producer gives a little bit of
>> output at each step of recursion, which a consumer can than crunch in
>> a lazy way?
> It has more to do with "tying the knot" (using laziness to define values in 
> terms of themselves), though there are similarities. Take the function:
>    infZipWith f ~(x:xs) ~(y:ys) = f x y : infZipWith f xs ys

What about using a custom list type, that has only one constructor like 
(:), that is, a type for infinite lists?

More information about the Haskell-Cafe mailing list