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?

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to