[Haskell-cafe] CPS and the product function
michael rice
nowgate at yahoo.com
Mon Apr 20 10:32:47 EDT 2009
Hi Eugene,
Clever solution.
It didn't come right back so I interrupted it. Guess it would do all those multiplies by zero.
Does anyone know how to define it to avoid that?
Thanks.
Michael
--- On Mon, 4/20/09, Eugene Kirpichov <ekirpichov at gmail.com> wrote:
From: Eugene Kirpichov <ekirpichov at gmail.com>
Subject: Re: [Haskell-cafe] CPS and the product function
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Monday, April 20, 2009, 9:40 AM
Check that by experiment in ghci or by looking at the source:
Prelude*> product [0..]
Or search "product" at http://holumbus.fh-wedel.de/hayoo/hayoo.html
and click on one of the Source links.
2009/4/20 michael rice <nowgate at yahoo.com>:
> I've been looking at CPS in Haskell and wondering how many multiplications
> the product function performs if it encounters a zero somewhere in the input
> list. Zero?
>
> Does anyone know the definition of the product function?
>
> Michael
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
--
Eugene Kirpichov
Web IR developer, market.yandex.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090420/93bc807e/attachment.htm
More information about the Haskell-Cafe
mailing list