[Haskell-cafe] Constructor question

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Jul 31 09:32:58 EDT 2010

michael rice <nowgate at yahoo.com> writes:

> From: Data.Complex
> data (RealFloat a) => Complex a
>   = !a :+ !a
> What's the purpose of the exclamation marks?

Forcing; it means that the values are evaluated (up to WHNF) before the
Complex value is constructed:


Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list