[Haskell-beginners] Data.Stream interleave implementation question

Kim-Ee Yeoh ky3 at atamo.com
Wed Feb 12 08:10:21 UTC 2014


On Wed, Feb 12, 2014 at 11:23 AM, Bryan Brady <bryan.brady at gmail.com> wrote:

> ruler :: Stream Integer
> ruler = foldr1 interleaveStreams (map streamRepeat [0..])
>

This is an interesting solution.

I'd hazard to say that it's probably not the solution the author had in
mind, so bonus points for novelty!

How would you prove it correct though?

-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140212/4e4b64a1/attachment-0001.html>


More information about the Beginners mailing list