[Haskell-cafe] Efficiency/Evaluation Question
Christopher Howard
christopher.howard at frigidcode.com
Sun Jun 16 03:05:40 CEST 2013
On 06/15/2013 05:02 PM, Christopher Howard wrote:
> On 06/15/2013 04:39 PM, Tommy Thorn wrote:
>
> Perhaps to simplify the question somewhat with a simpler example.
> Suppose you have
>
> code:
> --------
> let f x = if (x > 4) then f 0 else (sin x + 2 * cos x) : f (x + 1)
> --------
>
> After calculating at x={0,1,2,3}, and the cycle repeats, are sin, cos,
> etc. calculated anymore?
That might have been ambiguous. What I meant was:
code:
--------
let f x = if (x > 4) then f 0 else (sin x + 2 * cos x) : f (x + 1)
--------
If I calculate (f 0), and the cycle repeats after four values, are sin,
cos, etc. calculated anymore?
--
frigidcode.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130615/33805da8/attachment.pgp>
More information about the Haskell-Cafe
mailing list