Evaluation Question

Matthew Donadio m.p.donadio@ieee.org
Sat, 11 Jan 2003 13:54:41 -0500


Hi all,

I have a question about lazy evaluation.  In the following function:

> nco    :: RealFloat a => a -> [ Complex a ]
> nco wn = 1 : map ((*) (cis wn)) (nco wn)

will the sin and cos associated with cis be evaluated once, or for each
call?

Thanks.

-- 
Matthew Donadio (m.p.donadio@ieee.org)